I'm trying to make unit tests in Symfony 3 framework. Here are my configurations;
and here is the error that I'm facing.
/Applications/MAMP/bin/php/php7.0.0/bin/php /private/var/folders/w9/cmwlplqx53x3slxkm4c1chx00000gn/T/ide-phpunit.php --bootstrap /Users/muhammetergenc/code/kampweb/phpunit.xml.dist --configuration /Users/muhammetergenc/code/kampweb/phpunit.xml.dist Tests\AppBundle\Controller\PersonTest /Users/muhammetergenc/code/kampweb/tests/AppBundle/Controller/PersonTest.php
Testing started at 3:04 PM ...
xsi:noNamespaceSchemaLocation="http://schema.phpunit.de/4.1/phpunit.xsd"
backupGlobals="false"
colors="true"
bootstrap="app/autoload.php">
tests
src
src/*Bundle/Resources
src/*/*Bundle/Resources
src/*/Bundle/*Bundle/Resources
Process finished with exit code 255
I do have the same configuration on my other desktop and it works just fine.
# Answer 1
Today I had the same error - 255.
in my case I hadn't declared CONSTANS in the setUp method.
I think that you have something similar.
Try to find it by using xdebug - it helped me out.
# Answer 2
In my case, it was a memory issue.
In the setUp() method I initialize multiple class properties.
The fix for me was defining (override) the tearDown() method to unset the properties after each test.
protected function tearDown(): void
{
// clean memory
unset($this->foo);
unset($this->bar);
parent::tearDown();
}