젠드 프레임 워크 위에 단위 테스트를 작성하기 위해 ZendCast
을 따라합니다. 나는이 파일을 phpunit을 실행하려고 할 때 나는 "boostrap.php"파일이 실행 않는지 확인 수 있지만, 불행하게도PHP 정의가 XML 정의 테스트 스위트를 허용하지 않는 이유는 무엇입니까?
<?xml version="1.0" encoding="UTF-8"?>
<phpunit bootstrap="./application/bootstrap.php" colors="true">
<testsuites>
<testsuite name="RefreshTests">
<directory>./</directory>
</testsuite>
</testsuites>
<filter>
<whitelist>
<directory suffix=".php">../application</directory>
</whitelist>
<exclude></exclude>
</filter>
<logging>
<log type="coverage-html" target="./log/report" charset="UTF-8"
yui="true" highlight="true" lowUpperBound="50" highLowerBound="80" />
<log type="testdox" target="./log/testdox.html" />
</logging>
</phpunit>
: 비디오와 몇 가지 다른 소스 사이에, 내 phpunit.xml
은 다음과 같습니다 나는 런타임에이 오류가 발생합니다 :
PHPUnit_Framework_Exception : 둘 다 "RefreshTests.php"이나 "RefreshTests.php"를 열 수 있습니다. C에서 : \의 Program Files (x86) \ PHP는 \ 배 \ phpunit을 \ 백분율 \ 해골 \ Test.php 라인 (102)
이 그 phpunit을을 나타낼 것으로 보인다
내가 테스트라는 이름의 내용을 기반으로 파일을 찾고 있습니다 suite가 전체 디렉토리에 대해 실행되도록 내 소원을 존중하는 대신 실행되도록 테스트를 찾으십시오. 이것에도 불구하고 PHPUnit's documentation quite explicitly says that defining a test suite this way is allowed.
나는 무엇을 잘못 했습니까?
Windows 문제 일 수 있습니다. 어떤 phpunit 버전을 사용하고 있습니까? 배 배포가 유효하지 않을 수도 있습니다. –
오류 경로가 올바르지 않거나 테스트를 사용할 수 없습니다 (예 : ClassTest.php와 같은 접두사 테스트 파일이 있습니까?) – opHASnoNAME
예. github에 파일? –