Skip to content

Commit e14df5e

Browse files
committed
Update Test.php
1 parent cefe56d commit e14df5e

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

tests/Test.php

+6-2
Original file line numberDiff line numberDiff line change
@@ -1178,15 +1178,19 @@ public function testClassListValue()
11781178

11791179
/**
11801180
* @group classList
1181-
* @expectedException \Exception
11821181
*/
11831182
public function testClassListUndefinedProperty()
11841183
{
11851184
$dom = new HTML5DOMDocument();
11861185
$dom->loadHTML('<html><body class=" a b c b a c"></body></html>');
11871186

11881187
$html = $dom->querySelector('html');
1189-
$html->classList->someProperty;
1188+
try {
1189+
$html->classList->someProperty;
1190+
$this->assertTrue(false); // should not get here
1191+
} catch (\Exception $e) {
1192+
$this->assertTrue(true);
1193+
}
11901194
}
11911195

11921196
/**

0 commit comments

Comments
 (0)