Skip to content
This repository was archived by the owner on May 16, 2018. It is now read-only.

Commit eca162a

Browse files
committed
[#293] Ensure Zend\Xml tests pass on PHP 5.2
- Prior to 5.3, you needed to cast a simplexml node to a scalar in order to do comparisons.
1 parent c675b9d commit eca162a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tests/Zend/Xml/SecurityTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ public function testScanSimpleXmlResult()
9090
{
9191
$result = Zend_Xml_Security::scan($this->_getXml());
9292
$this->assertTrue($result instanceof SimpleXMLElement);
93-
$this->assertEquals($result->result, 'test');
93+
$this->assertEquals((string) $result->result, 'test');
9494
}
9595

9696
public function testScanDom()
@@ -130,7 +130,7 @@ public function testScanFile()
130130

131131
$result = Zend_Xml_Security::scanFile($file);
132132
$this->assertTrue($result instanceof SimpleXMLElement);
133-
$this->assertEquals($result->result, 'test');
133+
$this->assertEquals((string) $result->result, 'test');
134134
unlink($file);
135135
}
136136

0 commit comments

Comments
 (0)