Skip to content

Commit

Permalink
Update Test.php
Browse files Browse the repository at this point in the history
  • Loading branch information
ivopetkov committed Jan 4, 2021
1 parent cefe56d commit e14df5e
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions tests/Test.php
Original file line number Diff line number Diff line change
Expand Up @@ -1178,15 +1178,19 @@ public function testClassListValue()

/**
* @group classList
* @expectedException \Exception
*/
public function testClassListUndefinedProperty()
{
$dom = new HTML5DOMDocument();
$dom->loadHTML('<html><body class=" a b c b a c"></body></html>');

$html = $dom->querySelector('html');
$html->classList->someProperty;
try {
$html->classList->someProperty;
$this->assertTrue(false); // should not get here
} catch (\Exception $e) {
$this->assertTrue(true);
}
}

/**
Expand Down

0 comments on commit e14df5e

Please sign in to comment.