forked from the-crucible/phpunit-examples
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path22Equals3.php
More file actions
30 lines (28 loc) · 765 Bytes
/
22Equals3.php
File metadata and controls
30 lines (28 loc) · 765 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
<?php
/**
* assertEquals(
* DOMDocument $expected,
* DOMDocument $actual[,
* string $message = '']
* )
*
* Reports an error identified by $message if the uncommented canonical form of
* the XML documents represented by the two DOMDocument objects
* $expected and $actual are not equal.
*/
class XmlEqualsTest extends PHPUnit_Framework_TestCase
{
/**
* assertEquals can check xml document equality also
* just like EqualXmlStructure function
*/
public function testFailure()
{
$expected = new DOMDocument;
$expected->loadXML('<foo><bar/></foo>');
$actual = new DOMDocument;
$actual->loadXML('<bar><foo/></bar>');
$this->assertEquals($expected, $actual);
}
}
?>