PhpUnit failing in PhpStorm w/ exit code 255 in Symfony 2 project

前端 未结 4 654
暗喜
暗喜 2020-12-11 04:25

I\'m having trouble getting phpunit working inside of a Symfony project in PhpStorm - phpunit -c app works fine in the OSX terminal.

Here is the error:

4条回答
  •  轮回少年
    2020-12-11 05:26

    I ran into the same issue and found the following solution in the documentation: http://symfony.com/doc/current/book/testing.html#your-first-functional-test

    To run your functional tests, the WebTestCase class bootstraps the kernel of your application. In most cases, this happens automatically. However, if your kernel is in a non-standard directory, you'll need to modify your phpunit.xml.dist file to set the KERNEL_DIR environment variable to the directory of your kernel:

    
        
        
            
        
        
    
    

    So check your phpunit.xml.dist configuration file and try to add the absolute path to your app-directory.

    Hope it helps.

提交回复
热议问题