1111
1212namespace PhpBench \Dom \Tests \Unit ;
1313
14- use PHPUnit \Framework \TestCase ;
1514use PhpBench \Dom \Document ;
15+ use PHPUnit \Framework \TestCase ;
1616
1717class ElementTest extends TestCase
1818{
1919 private $ element ;
2020 private $ document ;
2121
22- public function setUp (): void
22+ protected function setUp (): void
2323 {
2424 $ this ->document = new Document ();
2525 $ this ->element = $ this ->document ->createRoot ('test ' );
@@ -28,7 +28,7 @@ public function setUp(): void
2828 /**
2929 * It should create and append a child element.
3030 */
31- public function testAppendElement ()
31+ public function testAppendElement (): void
3232 {
3333 $ element = $ this ->element ->appendElement ('hello ' );
3434 $ result = $ this ->document ->evaluate ('count(//hello) ' );
@@ -39,7 +39,7 @@ public function testAppendElement()
3939 /**
4040 * It should exeucte an XPath query.
4141 */
42- public function testQuery ()
42+ public function testQuery (): void
4343 {
4444 $ boo = $ this ->element ->appendElement ('boo ' );
4545 $ nodeList = $ this ->element ->query ('.//* ' );
@@ -52,7 +52,7 @@ public function testQuery()
5252 /**
5353 * It should evaluate an XPath expression.
5454 */
55- public function testEvaluate ()
55+ public function testEvaluate (): void
5656 {
5757 $ boo = $ this ->element ->appendElement ('boo ' );
5858 $ count = $ this ->element ->evaluate ('count(.//*) ' );
@@ -64,7 +64,7 @@ public function testEvaluate()
6464 /**
6565 * It should query for one element.
6666 */
67- public function testQueryOne ()
67+ public function testQueryOne (): void
6868 {
6969 $ boo = $ this ->element ->appendElement ('boo ' );
7070 $ node = $ this ->element ->queryOne ('./boo ' );
@@ -74,7 +74,7 @@ public function testQueryOne()
7474 /**
7575 * It should return null if one element is queried for an it none exist.
7676 */
77- public function testQueryOneNone ()
77+ public function testQueryOneNone (): void
7878 {
7979 $ node = $ this ->element ->queryOne ('./boo ' );
8080 $ this ->assertNull ($ node );
@@ -83,7 +83,7 @@ public function testQueryOneNone()
8383 /**
8484 * It should return the XML contained in the node.
8585 */
86- public function testDumpNode ()
86+ public function testDumpNode (): void
8787 {
8888 $ this ->element ->appendElement ('boo ' );
8989 $ dump = $ this ->element ->dump ();
0 commit comments