Просмотр исходного кода

[#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.
Matthew Weier O'Phinney 12 лет назад
Родитель
Сommit
eca162a3a9
1 измененных файлов с 2 добавлено и 2 удалено
  1. 2 2
      tests/Zend/Xml/SecurityTest.php

+ 2 - 2
tests/Zend/Xml/SecurityTest.php

@@ -90,7 +90,7 @@ XML;
     {
         $result = Zend_Xml_Security::scan($this->_getXml());
         $this->assertTrue($result instanceof SimpleXMLElement);
-        $this->assertEquals($result->result, 'test');
+        $this->assertEquals((string) $result->result, 'test');
     }
 
     public function testScanDom()
@@ -130,7 +130,7 @@ XML;
 
         $result = Zend_Xml_Security::scanFile($file);
         $this->assertTrue($result instanceof SimpleXMLElement);
-        $this->assertEquals($result->result, 'test');
+        $this->assertEquals((string) $result->result, 'test');
         unlink($file);
     }