assertInstanceOf('Assetic\\Filter\\FilterInterface', $filter, 'FilterCollection implements FilterInterface'); } public function testEnsure() { $filter = $this->getMock('Assetic\\Filter\\FilterInterface'); $asset = $this->getMock('Assetic\\Asset\\AssetInterface'); $filter->expects($this->once())->method('filterLoad'); $coll = new FilterCollection(); $coll->ensure($filter); $coll->ensure($filter); $coll->filterLoad($asset); } public function testAll() { $filter = new FilterCollection(array( $this->getMock('Assetic\\Filter\\FilterInterface'), $this->getMock('Assetic\\Filter\\FilterInterface'), )); $this->assertInternalType('array', $filter->all(), '->all() returns an array'); } public function testEmptyAll() { $filter = new FilterCollection(); $this->assertInternalType('array', $filter->all(), '->all() returns an array'); } public function testCountable() { $filters = new FilterCollection(array($this->getMock('Assetic\\Filter\\FilterInterface'))); $this->assertEquals(1, count($filters), 'Countable returns the count'); } }