Changeset 318
- Timestamp:
- 12/10/07 09:05:13 (10 months ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
branches/2.3/docs/phing_guide/book/chapters/appendixes/AppendixC-OptionalTasks.html
r270 r318 249 249 </fileset> 250 250 </coverage-setup> 251 <phpunit 2codecoverage="true">251 <phpunit codecoverage="true"> 252 252 <batchtest> 253 253 <fileset dir="src"> … … 255 255 </fileset> 256 256 </batchtest> 257 </phpunit 2>257 </phpunit> 258 258 </pre> 259 259 … … 699 699 <!-- xml formatter --> 700 700 <formatter type="xml" output="output.xml"/> 701 701 702 702 <!-- custom formatter --> 703 703 <formatter classname="path.to.CustomFormatterClass"> … … 708 708 <formatter type="plain" usefile="false" /><br /></pdo> 709 709 </pre> 710 710 711 711 </li> 712 712 </ul> … … 1067 1067 </pre> 1068 1068 <p>Check syntax of a fileset of source files.</p> 1069 <h2><a name="PHPUnit 2Task"></a>PHPUnit2Task</h2>1070 <p>This task runs testcases using the <a href="http://www.phpunit.de/" target="_blank">PHPUnit 2</a> framework.1069 <h2><a name="PHPUnitTask"></a>PHPUnitTask</h2> 1070 <p>This task runs testcases using the <a href="http://www.phpunit.de/" target="_blank">PHPUnit</a> framework. 1071 1071 It is a functional port of the Ant <a href="http://ant.apache.org/manual/OptionalTasks/junit.html" target="_blank">JUnit</a> task. 1072 1072 </p> 1073 <p><b>NB:</b> the identifiers <i>phpunit2</i> (PHPUnit2Task) and <i>phpunit3</i> (PHPUnit3Task) have been deprecated, but are still 1074 available to maintain backwards compatibility.</p> 1073 1075 <h3>Attributes</h3> 1074 1076 <table> … … 1091 1093 </tr> 1092 1094 <tr> 1095 <td>codecoverage</td> 1096 <td>Boolean</td> 1097 <td> Gather code coverage information while running tests (requires Xdebug). </td> 1098 <td>false</td> 1099 <td>No</td> 1100 </tr> 1101 <tr> 1093 1102 <td>haltonerror</td> 1094 1103 <td>Boolean</td> … … 1104 1113 <td>No</td> 1105 1114 </tr> 1115 <tr> 1116 <td>haltonincomplete</td> 1117 <td>Boolean</td> 1118 <td> Stop the build process if any incomplete tests are encountered. </td> 1119 <td>false</td> 1120 <td>No</td> 1121 </tr> 1122 <tr> 1123 <td>haltonskipped</td> 1124 <td>Boolean</td> 1125 <td> Stop the build process if any skipped tests are encountered. </td> 1126 <td>false</td> 1127 <td>No</td> 1128 </tr> 1129 <tr> 1130 <td>failureproperty</td> 1131 <td>String</td> 1132 <td>Name of property to set (to true) on failure.</td> 1133 <td>n/a</td> 1134 <td>No</td> 1135 </tr> 1106 1136 <tr> 1107 1137 <td>errorproperty</td> … … 1112 1142 </tr> 1113 1143 <tr> 1114 <td>failureproperty</td> 1115 <td>String</td> 1116 <td>Name of property to set (to true) on failure.</td> 1144 <td>incompleteproperty</td> 1145 <td>String</td> 1146 <td>Name of property to set (to true) on incomplete tests.</td> 1147 <td>n/a</td> 1148 <td>No</td> 1149 </tr> 1150 <tr> 1151 <td>skippedproperty</td> 1152 <td>String</td> 1153 <td>Name of property to set (to true) on skipped tests.</td> 1117 1154 <td>n/a</td> 1118 1155 <td>No</td> … … 1129 1166 the other emits plain text. The formatter named brief will only print detailed information for testcases 1130 1167 that failed, while plain gives a little statistics line for all test cases. Custom formatters that 1131 implement phing.tasks.ext.PHPUnit 2ResultFormatter can be specified.</p>1168 implement phing.tasks.ext.PHPUnitResultFormatter can be specified.</p> 1132 1169 <p>If you use the XML formatter, it may not include the same output that your tests have written as 1133 1170 some characters are illegal in XML documents and will be dropped.</p> … … 1222 1259 </ul> 1223 1260 <h3>Examples</h3> 1224 <pre><phpunit 2>1261 <pre><phpunit> 1225 1262 <formatter todir="reports" type="xml"/> 1226 1263 <batchtest> … … 1230 1267 </fileset> 1231 1268 </batchtest> 1232 </phpunit 2>1269 </phpunit> 1233 1270 </pre> 1234 1271 <p>Runs all matching testcases in the directory <em>tests</em>, writing 1235 1272 XML results to the directory <em>reports</em>.</p> 1236 <pre><phpunit 2haltonfailure="true" haltonerror="true">1273 <pre><phpunit codecoverage="true" haltonfailure="true" haltonerror="true"> 1237 1274 <formatter type="plain" usefile="false"/> 1238 1275 <batchtest> … … 1241 1278 </fileset> 1242 1279 </batchtest> 1243 </phpunit 2>1280 </phpunit> 1244 1281 </pre> 1245 1282 <p> 1246 Runs all matching testcases in the directory <em>tests</em>, writing plain1283 Runs all matching testcases in the directory <em>tests</em>, gathers code coverage information, writing plain 1247 1284 text results to the console. The build process is aborted if a test 1248 1285 fails.</p> … … 1251 1288 and counting, and could possibly lead to strange results. Instead, use one of more fileset's to provide a list of testcases to execute.</p> 1252 1289 1253 <h2><a name="PHPUnit2Report"></a>PHPUnit2Report</h2> 1254 <p>This task transforms PHPUnit2 xml reports to HTML using XSLT.</p> 1290 <h2><a name="PHPUnitReport"></a>PHPUnitReport</h2> 1291 <p>This task transforms PHPUnit xml reports to HTML using XSLT.</p> 1292 <p><b>NB:</b> the identifiers <i>phpunit2report</i> (PHPUnit2Report) and <i>phpunit3report</i> (PHPUnit3Report) have been deprecated, but are still 1293 available to maintain backwards compatibility.</p> 1255 1294 <h3>Attributes</h3> 1256 1295 <table> … … 1304 1343 </table> 1305 1344 <h3>Examples</h3> 1306 <pre><phpunit 2report infile="reports/testsuites.xml" format="frames" todir="reports/tests" styledir="/home/phing/etc"/>1345 <pre><phpunitreport infile="reports/testsuites.xml" format="frames" todir="reports/tests" styledir="/home/phing/etc"/> 1307 1346 </pre> 1308 1347 <p>Generates a framed report in the directory <em>reports/tests</em> using branches/2.3/docs/phing_guide/book/toc/FrameToC.html
r272 r318 134 134 <li><a href="../chapters/appendixes/AppendixC-OptionalTasks.html#PhpDocumentorTask" target="Content">PhpDocumentorTask</a></li> 135 135 <li><a href="../chapters/appendixes/AppendixC-OptionalTasks.html#PhpLintTask" target="Content">PhpLintTask</a></li> 136 <li><a href="../chapters/appendixes/AppendixC-OptionalTasks.html#PHPUnit 2Task" target="Content">PHPUnit2Task</a></li>137 <li><a href="../chapters/appendixes/AppendixC-OptionalTasks.html#PHPUnit 2Report" target="Content">PHPUnit2Report</a></li>136 <li><a href="../chapters/appendixes/AppendixC-OptionalTasks.html#PHPUnitTask" target="Content">PHPUnitTask</a></li> 137 <li><a href="../chapters/appendixes/AppendixC-OptionalTasks.html#PHPUnitReport" target="Content">PHPUnitReport</a></li> 138 138 <li><a href="../chapters/appendixes/AppendixC-OptionalTasks.html#SvnCheckoutTask" target="Content">SvnCheckoutTask</a></li> 139 139 <li><a href="../chapters/appendixes/AppendixC-OptionalTasks.html#SvnExportTask" target="Content">SvnExportTask</a></li> branches/2.3/docs/phing_guide/book/toc/ToC.html
r272 r318 119 119 <li><a href="../chapters/appendixes/AppendixC-OptionalTasks.html#PhpDocumentorTask">PhpDocumentorTask</a></li> 120 120 <li><a href="../chapters/appendixes/AppendixC-OptionalTasks.html#PhpLintTask">PhpLintTask</a></li> 121 <li><a href="../chapters/appendixes/AppendixC-OptionalTasks.html#PHPUnit 2Task">PHPUnit2Task</a></li>122 <li><a href="../chapters/appendixes/AppendixC-OptionalTasks.html#PHPUnit 2Report">PHPUnit2Report</a></li>121 <li><a href="../chapters/appendixes/AppendixC-OptionalTasks.html#PHPUnitTask">PHPUnitTask</a></li> 122 <li><a href="../chapters/appendixes/AppendixC-OptionalTasks.html#PHPUnitReport">PHPUnitReport</a></li> 123 123 <li><a href="../chapters/appendixes/AppendixC-OptionalTasks.html#SvnCheckoutTask">SvnCheckoutTask</a></li> 124 124 <li><a href="../chapters/appendixes/AppendixC-OptionalTasks.html#SvnExportTask">SvnExportTask</a></li>
