PHPUnitManual:C.2

From 흡혈양파의 번역工房
Jump to navigation Jump to search
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.
Appendix C.2 Test Suites

<testsuites> element 와 그 element 의 자식인 <testsuite> 를 사용하여, test suite 의 집합이나 test case 집합 안에서 test suite 를 구성합니다.

<testsuites>
  <testsuite name="My Test Suite">
    <directory>/path/to/*Test.php files</directory>
    <file>/path/to/MyTest.php</file>
    <exclude>/path/to/exclude</exclude>
  </testsuite>
</testsuites>


phpVersion 과 phpVersionOperator 속성을 사용하여 필요한 PHP 버젼을 지정할 수 있습니다. 다음 예는 PHP 버젼이 5.3.0 이상인 경우에만 /path/to/*Test.php 과 /path/to/MyTest.php 을 추가합니다.

  <testsuites>
    <testsuite name="My Test Suite">
      <directory suffix="Test.php" phpVersion="5.3.0" phpVersionOperator=">=">/path/to/files</directory>
      <file phpVersion="5.3.0" phpVersionOperator=">=">/path/to/MyTest.php</file>
    </testsuite>
  </testsuites>


phpVersionOperator 속성은 옵션이고, 기본값은 >= 입니다.


Notes