Fix phpunit errors with php notice already defined#8
Fix phpunit errors with php notice already defined#8cepa wants to merge 1 commit intomichelf:masterfrom cepa:master
Conversation
|
I don't understand why this is needed. Do you |
|
Well, this should not be a problem in "production" code, but in phpunit with process isolation this file can be loaded multiple times and that throws php notice: And this multiplied by the number of tests :) The fix does not affect the use of smartypants but it helps to avoid this issue and it allows to override default constant values. |
|
Does that so called "process isolation" works by including things many times in different namespaces? If that's the case, it won't work with code that use That said, I do plan to make a new version of PHP Smartypants mimicking the new lib branch in PHP Markdown that will target PHP 5.3 and get rid of those |
|
The thing with define() and phpunit is already reported: sebastianbergmann/phpunit#314 |
Hi,
this is a small fix for smartypants to avoid throwing php notice about a constant already defined in phpunit tests if smartypants is a part of a project.
thx