Testing collections in PHPUnit

Code
<?php

class Foo{}

class 
CollectionTypeTest extends PHPUnit_Framework_TestCase
{
    public function 
testCollection()
    {
        
$collection = [
            new 
Foo(),
            new 
Foo(),
            new 
Foo(),
        ];
        
        
$iterator = new ArrayIterator(
            
$collection
        
);
        
        
// assertCount/assertNotCount works on
        // Traversable too
        
$this->assertNotCount(0$collection);
        
$this->assertNotCount(0$iterator);
        
        
// collection with no elements is not
        // covered by this assert
        
$this->assertContainsOnlyInstancesOf('Foo'$collection);
        
$this->assertContainsOnlyInstancesOf('Foo'$iterator);
    }
}
Result
Time: 946 ms, Memory: 2.00MB

OK (1 test, 0 assertions)
Used Versions
PHP 7.1, Zend 3.0, Symfony 3.2, Laravel 5.2, PHPUnit 5.6, Doctrine 2.6