Supported Nested Tags

  • formatter

    The results of the tests can be printed in different formats. Output will always be sent to a file, unless you set the usefile attribute to false. The name of the file is predetermined by the formatter and can be changed by the outfile attribute.

    There are four predefined formatters - xml and clover print the test results in the JUnit and Clover XML formats, the other two emit plain text. The brief formatter will only print detailed information for testcases that failed, while plain emits a short statistics line for all test cases. Custom formatters that implement phing.tasks.ext.phpunit.formatter.PHPUnitResultFormatter can be specified.

    Table 137. Attributes

    Name Type Description Default Required
    type String Use a predefined formatter (either xml, plain, clover, or brief). n/a One of these is required.
    classname String Name of a custom formatter class. n/a
    usefile Boolean Boolean that determines whether output should be sent to a file. true No
    todir String Directory to write the file to. n/a No
    outfile String Filename of the result. Depends on formatter No

  • batchtest

    Define a number of tests based on pattern matching. batchtest collects the included files from any number of nested <fileset>s. It then generates a lists of classes that are (in)directly defined by each PHP file.

    Table 138. Attributes

    Name Type Description Default Required
    exclude String A list of classes to exclude from the pattern matching. For example, when you have two baseclasses BaseWebTest and BaseMathTest, which are included a number of testcases (and thus added to the list of testclasses), you can exclude those classes from the list by typing exclude="BaseWebTest BaseMathTest". n/a No
    classpath String Used to define more paths on which - besides the PHP include_path - to look for the test files. n/a No
    name String The name that is used to create a testsuite from this batchtest. Phing Batchtest No