Skip to content

Commit

Permalink
[TEST] Fix/Remove Tests
Browse files Browse the repository at this point in the history
The properties are now implemented by PHPs DOM, keep the existing
tests just for verification.
  • Loading branch information
ThomasWeinert committed Oct 19, 2023
1 parent aab6197 commit ca59e5c
Showing 1 changed file with 0 additions and 14 deletions.
14 changes: 0 additions & 14 deletions tests/FluentDOM/DOM/Node/NonDocumentTypeChildNodeTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -115,30 +115,16 @@ public function testSetNextElementChildExpectingException(): void {
$document = new Document();
$document->loadXML('<foo><!--comment--></foo>');
$this->expectException(\Error::class);
$this->expectExceptionMessage(
'Cannot write read-only property FluentDOM\\DOM\\Comment::$nextElementSibling'
);
$document->documentElement->firstChild->nextElementSibling = $document->createElement('foo');
}

public function testSetPreviousElementChildExpectingException(): void {
$document = new Document();
$document->loadXML('<foo><!--comment--></foo>');
$this->expectException(\Error::class);
$this->expectExceptionMessage(
'Cannot write read-only property FluentDOM\\DOM\\Comment::$previousElementSibling'
);
$document->documentElement->firstChild->previousElementSibling = $document->createElement('foo');
}

public function testSetUnknownProperty(): void {
$document = new Document();
$document->loadXML('<foo><!--comment--></foo>');
$node = $document->documentElement->firstChild;
$this->expectException(\ErrorException::class);
$node->SOME_PROPERTY = 'success';
}

public function testIssetUnknownPropertyExpectingFalse(): void {
$document = new Document();
$document->loadXML('<foo><!--comment--></foo>');
Expand Down

0 comments on commit ca59e5c

Please sign in to comment.