Closed ivang76 closed 4 years ago
I tested on my projects and server but tell me if you need something else
There needs to be a phpunit test in the tests/MailTrackerTest.php file that fails without your change but passes with your change. You can run the tests with vendor/bin/phpunit
You could probably duplicate the it_handles_ampersands_in_links
test and create a new test email with your use case
I never used phpunit to make test, so I'm gonna try to understand quickly how to use it...
Hi @jdavidbakr I added the phpunittest and done a commit... do you see it or should I open another pr now? (I don't undersand why but it seems I cannot push the last commit... maybe because there is already this pr opened?)
λ git log
commit eb1a52e33079cabb71fb5f86b6bdb0260c7245db
Author: Ivan <g...>
Date: Thu Aug 6 18:06:13 2020 +0200
added phpunit test
You should be able to push it to your repo and it automatically update the pull request.
Add more commits by pushing to the master branch on ivang76/mail-tracker.
ok done... let me know
Looks like your test didn't pass
can you help me a bit to sort it out? as I told you I'm not used to phpunit tests
I have problems with my version of laravel and Orchestra\Testbench\TestCase... could you have a look and close this phpunit test so that the fix can be merged? Actually I'm still using my fix in prod without problem but in this way I can't update the vendors... thanks
Your issue is that lines 689-691 of the test is expecting there to be two links in your email. Note that the TestAmpersand.blade.php has a link without the ampersand, but your testApostrophe.blade.php doesn't have that. You can just change line 691 to be $aLink = $links[0]
.
Ideally with TDD you will write the test first, get a fail (it would have failed on line 698), and then write the code to get the test to pass.
ok done
Thanks - released version 4.0.6
Thanks, can you add a test for this change?