php exit code 255,PHPStorm - Process finished with exit code 255

I'm trying to make unit tests in Symfony 3 framework. Here are my configurations;

1Z1VK.png

xcEDF.png

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

4d350fd91e33782268f371d7edaa8a76.png

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();

}

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值