Ticket #237 (new defect)

Opened 2 months ago

Last modified 2 months ago

Several PHP errors in XSLTProcessor

Reported by: onox Assigned to: mrook
Priority: minor Milestone: 2.3.1
Component: phing-tasks-phpunit Version: 2.3.0
Keywords: Cc:

Description

I got the following errors:

Unit Tests > test:

[phpunit2] Tests run: 31, Failures: 1, Errors: 0, Incomplete: 3, Skipped: 0, Time elapsed: 0.15495 s

[PHP Error] XSLTProcessor::transformToXml(): runtime error: file /usr/share/php/data/phing/etc/phpunit2-noframes.xsl line 411 element choose [line 140 of /usr/share/php5/phing/tasks/ext/phpunit/PHPUnitReportTask.php] [PHP Error] XSLTProcessor::transformToXml(): Variable 'word' has not been declared. [line 140 of /usr/share/php5/phing/tasks/ext/phpunit/PHPUnitReportTask.php] [PHP Error] XSLTProcessor::transformToXml(): xmlXPathCompOpEval: parameter error [line 140 of /usr/share/php5/phing/tasks/ext/phpunit/PHPUnitReportTask.php]

BUILD FINISHED

Using the following XML code in the used build.xml file:

<target name="test" depends="prepare">

<phpunit2 haltonfailure="false" printsummary="true">

<!-- Test all *Test.php files in unit/* directories --> <batchtest>

<fileset dir="unit">

<include name="**/*Test.php" />

</fileset>

</batchtest> <formatter type="xml" todir="report" outfile="report.xml" />

</phpunit2>

<!-- Generate styled report from XML file --> <phpunit2report infile="report/report.xml" todir="report" />

</target>

It seems this error occurs randomly (not depending on the time, but on the test code, even while the test code seems perfectly fine)

Produced html seems to be fine, except a white box instead of a brown box with black text (the time):

<a href="#top">Back to top</a><a name="SomeTest"></a><h3>TestCase SomeTest</h3> <table class="details" border="0" cellpadding="5" cellspacing="2" width="95%"> <tr valign="top"> <th>Name</th> <th>Status</th> <th width="80%">Type</th> <th nowrap>Time(s)</th> </tr>

<tr valign="top" class=""> <td>testA</td> <td>Success</td> <td></td> <td>0.015</td> </tr> <tr valign="top" class="Error"> <td>testB</td> <td>Failure</td> <td>N/A<code><br><br></code> </td>

</tr> </table> </body> </html>

<td>TIME HERE</td> is missing, and there's a strange piece of html: <code><br><br></code>

Attachments

Change History

03/21/08 09:40:01 changed by hans

  • priority changed from major to minor.

I haven't seen this, but will let Michiel comment on whether he knows what might be causing this.


Add/Change #237 (Several PHP errors in XSLTProcessor)