안녕 내 Symfony3 프로젝트의 모든 설치 phpunit을 내가 내 터미널 빈/phpunit을 -c 응용 프로그램에서에서 실행할 때이 오류가 얻을 :Symfony3 phpunit을 XML을
Could not load XML from empty string
가 봤하고 내가 앱에 필요한 밝혀졌다를 있습니다 할 수 그래서 지금
<?xml version="1.0" encoding="UTF-8"?>
<!-- http://www.phpunit.de/manual/current/en/appendixes.configuration.html -->
<phpunit
backupGlobals = "false"
backupStaticAttributes = "false"
colors = "true"
convertErrorsToExceptions = "true"
convertNoticesToExceptions = "true"
convertWarningsToExceptions = "true"
processIsolation = "false"
stopOnFailure = "false"
syntaxCheck = "false"
bootstrap = "autoload.php" >
<testsuites>
<testsuite name="Project Test Suite">
<directory>../src/*/*Bundle/Tests</directory>
<!--directory>../src/*/Bundle/*Bundle/Tests</directory-->
</testsuite>
</testsuites>
<!--
<php>
<server name="KERNEL_DIR" value="/path/to/your/app/" />
</php>
-->
<filter>
<whitelist>
<directory>../src</directory>
<exclude>
<directory>../src/*/*Bundle/Resources</directory>
<directory>../src/*/*Bundle/Tests</directory>
<!--directory>../src/*/Bundle/*Bundle/Resources</directory>
<directory>../src/*/Bundle/*Bundle/Tests</directory-->
</exclude>
</whitelist>
</filter>
</phpunit>
를 잘 작동하지만 난이 열려 답을 찾을 수 없습니다 질문 : 내 응용 프로그램/디렉토리에 phpunit.xml 파일 그래서 나는했고, 그것은 다음과 같습니다
PHP 단위가이 파일을 필요로하는 이유 파일에 phpunit이 어디에서 테스트를 찾을 수 있는지 보여줄 수 있지만이 모든 것입니까?
이 파일을 수동으로 생성했습니다. 터미널 명령과 같이 자동으로 생성하는 방법이 있습니다.
지금까지
<whitelist>
은 phpunit이 '보게'허용 된 곳입니까?<exlude>
phpunit은 'look'을 허용하지 않습니다. 그렇다면 왜 이<exlude>
에 해당하는지 테스트 할 수 있습니다. 첫 번째 질문에 대한
매우 유용한 정보를 제공해 주셔서 감사합니다. 그것은 지금 작동하지만 나는 이동해야합니다 ./ 루트 디렉토리에서 phpunit.xml.dist의 이름을 app 디렉토리로 변경해야합니다. 이유는 무엇입니까? 또한 phpunit.xml shouldynt를 VCS only phpunit.xml.dist로 커밋해야하며 프로젝트가 복제되면 composer update는 phpunit.xml을 기반으로 phpunit.xml을 설치합니다. – John
반가워요. 예. 정확히'.dist' 만 커밋합니다. 자동 이름 바꾸기의 경우 스크립트를 사용해야 할 것입니다. [Incenteev/ParameterHandler] (https://github.com/Incenteev/ParameterHandler)를보십시오. Symfony2'parameters.yml.dist' 파일에 사용되는 번들입니다. – ferdynator