PHPUnit5.0中文手册A. 断言assertXmlStringEqualsXmlString()
上一篇:assertXmlString... 下一篇:@author

assertXmlStringEqualsXmlString()

assertXmlStringEqualsXmlString(string $expectedXml, string $actualXml[, string $message = ''])

$actualXml 对应的 XML 文档与 $expectedXml 对应的 XML 文档不相同时报告错误,错误讯息由 $message 指定。

assertXmlStringNotEqualsXmlString() 是与之相反的断言,接受相同的参数。

Example A.46. assertXmlStringEqualsXmlString() 的用法


assertXmlStringEqualsXmlString(
          '', '');
    }
}
?>
phpunit XmlStringEqualsXmlStringTest
PHPUnit 5.0.0 by Sebastian Bergmann and contributors.
F
Time: 0 seconds, Memory: 5.00Mb
There was 1 failure:
1) XmlStringEqualsXmlStringTest::testFailure
Failed asserting that two DOM documents are equal.
--- Expected
+++ Actual
@@ @@
 
-  
+  
 
/home/sb/XmlStringEqualsXmlStringTest.php:7
FAILURES!
Tests: 1, Assertions: 1, Failures: 1.
上一篇:assertXmlString... 下一篇:@author