C.6 CoverageSetupTask
Prev | Appendix C. Optional tasks | Next

## C.6 CoverageSetupTask

The CoverageSetupTask prepares a database which can be used to gather code coverage information for unit tests.

Table C.7: Attributes

Name | Type | Description | Default | Required
--- | --- | --- | --- | ---
`database` | `String` | The location for the coverage database. | coverage.db | Yes

### C.6.1 Example

    <coverage-setup database="./reports/coverage.db">
      <fileset dir="classes">
        <include name="**/*.php"/>
      </fileset>
    </coverage-setup>
    <phpunit codecoverage="true">
      <batchtest>
        <fileset dir="src">
          <include name="*Test.php"/>
        </fileset>
      </batchtest>
    </phpunit>

### C.6.2 Supported Nested Tags

- `classpath`

- `fileset`

- `filelist`

Prev | Up | Next
C.5 CoverageReportTask | Home | C.7 CoverageThresholdTask