@@ -231,7 +231,7 @@ public function testGetNodesNameGlobs()
231231 /** @var $n \PHPCR\NodeInterface */
232232 array_push ($ nodes , $ n ->getName ());
233233 }
234- $ this ->assertEquals (2 , count ( $ nodes) );
234+ $ this ->assertCount (2 , $ nodes );
235235 $ this ->assertContains ('idExample ' , $ nodes );
236236 $ this ->assertContains ('test:namespacedNode ' , $ nodes );
237237 $ this ->assertNotContains ('jcr:content ' , $ nodes ); //jrc:content is not immediate child
@@ -390,7 +390,7 @@ public function testGetPropertiesValuesGlob()
390390 } elseif (count ($ props ) == 2 ) {
391391 $ this ->assertArrayHasKey ('jcr:primaryType ' , $ props );
392392 $ this ->assertArrayHasKey ('jcr:mixinTypes ' , $ props );
393- $ this ->assertEquals (0 , count ( $ props ['jcr:mixinTypes ' ]) );
393+ $ this ->assertCount (0 , $ props ['jcr:mixinTypes ' ]);
394394 } else {
395395 $ this ->fail ('wrong number of properties starting with jcr: ' );
396396 }
@@ -462,7 +462,7 @@ public function testGetReferencesAll()
462462 $ this ->assertInstanceOf ('Iterator ' , $ iterator );
463463
464464 //there are two nodes with reference to idExample.
465- $ this ->assertEquals (2 , count ( $ iterator) , "Wrong number of references to idExample " );
465+ $ this ->assertCount (2 , $ iterator , "Wrong number of references to idExample " );
466466 foreach ($ iterator as $ prop ) {
467467 $ this ->assertInstanceOf ('\PHPCR\PropertyInterface ' , $ prop );
468468 $ this ->assertTrue (in_array ($ prop , $ source ));
@@ -481,7 +481,7 @@ public function testGetReferencesOnNonReferencedNode()
481481 $ this ->assertInstanceOf ('Iterator ' , $ iterator );
482482
483483 //there is no node with reference to numberPropertyNode.
484- $ this ->assertEquals (0 , count ( $ iterator) , "Wrong number of references to numberPropertyNode " );
484+ $ this ->assertCount (0 , $ iterator , "Wrong number of references to numberPropertyNode " );
485485 }
486486
487487 /**
@@ -496,7 +496,7 @@ public function testGetReferencesName()
496496 $ this ->assertInstanceOf ('Iterator ' , $ iterator );
497497
498498 //there is exactly one node with reference to idExample.
499- $ this ->assertEquals (1 , count ( $ iterator) , "Wrong number of references with name ref to idExample " );
499+ $ this ->assertCount (1 , $ iterator , "Wrong number of references with name ref to idExample " );
500500 foreach ($ iterator as $ prop ) {
501501 $ this ->assertInstanceOf ('\PHPCR\PropertyInterface ' , $ prop );
502502 $ this ->assertEquals ($ source , $ prop );
@@ -515,7 +515,7 @@ public function testGetReferencesNonexistingName()
515515 $ target = $ this ->rootNode ->getNode ('tests_general_base/idExample ' );
516516 $ iterator = $ target ->getReferences ('notexisting ' );
517517 $ this ->assertInstanceOf ('Iterator ' , $ iterator );
518- $ this ->assertEquals (0 , count ( $ iterator) , "Wrong number of references with name notexisting to idExample " );
518+ $ this ->assertCount (0 , $ iterator , "Wrong number of references with name notexisting to idExample " );
519519 }
520520
521521 /**
@@ -530,7 +530,7 @@ public function testGetWeakReferencesAll()
530530 $ iterator = $ target ->getWeakReferences ();
531531 $ this ->assertInstanceOf ('Iterator ' , $ iterator );
532532
533- $ this ->assertEquals (2 , count ( $ iterator) , "Wrong number of weak references to weakreference_target " );
533+ $ this ->assertCount (2 , $ iterator , "Wrong number of weak references to weakreference_target " );
534534 foreach ($ iterator as $ prop ) {
535535 $ this ->assertInstanceOf ('\PHPCR\PropertyInterface ' , $ prop );
536536 $ this ->assertTrue (in_array ($ prop , $ source , true ));
@@ -548,7 +548,7 @@ public function testGetWeakReferencesName()
548548 $ iterator = $ target ->getWeakReferences ('ref1 ' );
549549 $ this ->assertInstanceOf ('Iterator ' , $ iterator );
550550
551- $ this ->assertEquals (1 , count ( $ iterator) , "Wrong number of weak references to weakreference_target " );
551+ $ this ->assertCount (1 , $ iterator , "Wrong number of weak references to weakreference_target " );
552552 foreach ($ iterator as $ prop ) {
553553 $ this ->assertInstanceOf ('\PHPCR\PropertyInterface ' , $ prop );
554554 $ this ->assertEquals ($ prop , $ source );
@@ -565,7 +565,7 @@ public function testGetWeakReferencesNonExistingName()
565565 $ iterator = $ target ->getWeakReferences ('unexisting_name ' );
566566 $ this ->assertInstanceOf ('Iterator ' , $ iterator );
567567
568- $ this ->assertEquals (0 , count ( $ iterator) , "Wrong number of weak references to weakreference_target " );
568+ $ this ->assertCount (0 , $ iterator , "Wrong number of weak references to weakreference_target " );
569569 }
570570
571571 /**
@@ -579,7 +579,7 @@ public function testGetWeakReferencesOnNonReferencedNode()
579579 $ this ->assertInstanceOf ('Iterator ' , $ iterator );
580580
581581 //there is no node with reference to numberPropertyNode.
582- $ this ->assertEquals (0 , count ( $ iterator) , "Wrong number of references to numberPropertyNode " );
582+ $ this ->assertCount (0 , $ iterator , "Wrong number of references to numberPropertyNode " );
583583 }
584584
585585 public function testGetSharedSetUnreferenced ()
0 commit comments