From d0c46aeb799b822fca2a865c4fa9889ae9f7e60e Mon Sep 17 00:00:00 2001 From: JoshyPHP Date: Fri, 29 Dec 2023 18:28:09 +0100 Subject: [PATCH] WiP --- tests/AttrTest.php | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 tests/AttrTest.php diff --git a/tests/AttrTest.php b/tests/AttrTest.php new file mode 100644 index 0000000..9f73a90 --- /dev/null +++ b/tests/AttrTest.php @@ -0,0 +1,28 @@ +loadXML(''); + + $this->assertFalse($dom->firstOf('//y/@a')->isEqualNode($dom->firstOf('//z/@a'))); + $this->assertFalse($dom->firstOf('//y/@a')->isEqualNode($dom->firstOf('//z/@b'))); + $this->assertFalse($dom->firstOf('//y/@a')->isEqualNode($dom->firstOf('//z/@c'))); + $this->assertFalse($dom->firstOf('//y/@b')->isEqualNode($dom->firstOf('//z/@a'))); + $this->assertTrue($dom->firstOf('//y/@b')->isEqualNode($dom->firstOf('//z/@b'))); + $this->assertFalse($dom->firstOf('//y/@b')->isEqualNode($dom->firstOf('//z/@c'))); + $this->assertFalse($dom->firstOf('//y/@c')->isEqualNode($dom->firstOf('//z/@a'))); + $this->assertFalse($dom->firstOf('//y/@c')->isEqualNode($dom->firstOf('//z/@b'))); + $this->assertFalse($dom->firstOf('//y/@c')->isEqualNode($dom->firstOf('//z/@c'))); + } +} \ No newline at end of file