Testing collections in PHPUnit

Code
<?php

use PHPUnit\Framework\TestCase;

class 
Foo{}

class 
CollectionTypeTest extends TestCase
{
    public function 
testCollection() : void
    
{
        
$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: 299 ms, Memory: 2.00 MB

OK (1 test, 0 assertions)
Used Versions
PHP 7.3, Zend 3.0, Symfony 4.3, Laravel 5.8, PHPUnit 8.0, Doctrine 2.10