I’ve been struggling for a while with phpunit and zend framework trying to be agile. I have a xml file with the config that had been working for a while
<phpunit bootstrap="./bootstrap.php">
<testsuite name="Unit test">
<directory>./unit</directory>
</testsuite>
<filter>
<whitelist>
<directory suffix=".php">../../library/Zend</directory>
</whitelist>
</filter>
</phpunit>
See that’s a simple config file. Now, when I reach the 100 assertions (yuppi!!) or is it the 10.00Mb Memory, I’ve found that the phpunit is not evaluating any more classes nor methods. I keep having this same output
PHPUnit 3.6.3 by Sebastian Bergmann.
Configuration read from C:\folder\tests\phpunit.xml
.............................
Time: 4 seconds, Memory: 10.00Mb
OK (29 tests, 100 assertions)
Am I missing something here? I’ve also tryed doing testsuites and groups but in the end I don’t think that last is working as expected
Write a phpunit test that outputs the current value for the memory limit
echo ini_get('memory_limit');If that is 10M, or close, edit it in php.ini (set to -1 to have no limit at all).
P.S. make sure you are looking at the right configuration file for the cli version of php.
P.P.S. I’d not leave
memory_limitat -1, once you confirmed that is the issue. I would set it to something much bigger, such as 64M. Then, in future, if a non-broken script ever needs more, increase it again.