Modify

Ticket #237 (closed defect: fixed)

Opened 4 years ago

Last modified 4 years ago

Several PHP errors in XSLTProcessor

Reported by: onox Owned by: 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

comment:1 Changed 4 years ago 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.

comment:2 Changed 4 years ago by mrook

  • Status changed from new to closed
  • Resolution set to fixed

This bug should have been fixed in the SVN tree, revision r380. Please try a new snapshot of the code to verify.

Thank you for the report, and for helping us make Phing better!

View

Add a comment

Modify Ticket

Action
as closed
The resolution will be deleted. Next status will be 'reopened'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.