2016-08-12 2 views
1

phpunit --testsuite 명령은 어떻게 사용합니까?phpunit --testsuite 옵션을 사용하는 방법?

예를 들어, 나는 testfile 위가 : 나는 phpunit을 실행하면

test/xxx/RegistrationConfirmedListenerTest.php 

가, 다음은 RegistrationConfirmedListenerTest.php에서 테스트를 실행하는 것뿐만 아니라 내 테스트 폴더에있는 다른 모든 테스트를 실행합니다.

나는이이 같은 --testsuite 옵션을 사용하여 시도 :

phpunit --testsuite RegistrationConfirmedListenerTest 

그러나, 아무것도 실행하지 않습니다.

PHPUnit 4.8.26 by Sebastian Bergmann and contributors. 



Time: 46 ms, Memory: 4.00Mb 

No tests executed! 

나는 여기에 문서를 읽고 있지만 도움이되는 어떤 사례가 없습니다 :

https://phpunit.de/manual/current/en/textui.html

답변

3

당신은 phpunit.xml을 만들고 거기 testsuites를 정의해야합니다.

<testsuites> 
    <testsuite name="youttestsuitename1"> 
     <file>./path/to/folder/</file> 
    </testsuite> 
    <testsuite name="youttestsuitename1"> 
     <file>./path/to/folder2/</file> 
    </testsuite> 
</testsuites> 

더 많은 정보 official documentations