2016-04-04 31 views
1

私はSymfony 3フレームワークでユニットテストをしようとしています。ここに私の構成です。 Run/Debug ConfigirationsPHPStorm - 終了コード255で終了したプロセス

PHPUnit Preferences

と、ここで私が直面していますエラーです。

/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 ... 
<?xml version="1.0" encoding="UTF-8"?> 

<!-- http://phpunit.de/manual/4.1/en/appendixes.configuration.html --> 
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
     xsi:noNamespaceSchemaLocation="http://schema.phpunit.de/4.1/phpunit.xsd" 
     backupGlobals="false" 
     colors="true" 
     bootstrap="app/autoload.php"> 

    <!-- <phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
      xsi:noNamespaceSchemaLocation="http://schema.phpunit.de/4.1/phpunit.xsd" 
      backupGlobals="false" 
      colors="true" 
      bootstrap="web/app_test.php">--> 
    <php> 
     <ini name="error_reporting" value="-1" /> 
     <server name="KERNEL_DIR" value="app/" /> 
    </php> 

    <testsuites> 
     <testsuite name="Project Test Suite"> 
      <directory>tests</directory> 
     </testsuite> 
    </testsuites> 

    <filter> 
     <whitelist> 
      <directory>src</directory> 
      <exclude> 
       <directory>src/*Bundle/Resources</directory> 
       <directory>src/*/*Bundle/Resources</directory> 
       <directory>src/*/Bundle/*Bundle/Resources</directory> 
      </exclude> 
     </whitelist> 
    </filter> 
</phpunit> 

Process finished with exit code 255 

私は他のデスクトップでも同じ設定をしていますが、うまくいきます。

+1

XMLファイルをブートストラップファイルとして使用するようにXMLファイルを設定すると、そのXMLをPHPとして実行しようとすると失敗します。 – JimL

+0

@JimLはPHPUnitフレームワークを拡張するPHPクラスではない場合、無視されませんか? –

+0

デフォルトのブートストラップファイルオプションをオフにしても、同じエラーが発生します。 @JimL – mburakergenc

答えて

0

今日私は同じエラーがありました - 255.私の場合、私はsetUpメソッドでCONSTANSを宣言していませんでした。

あなたは何か似ていると思います。 xdebugを使って見つけてください。それは私を助けました。