/** * @covers phpDocumentor\Descriptor\Filter\Filter::filter */ public function testFilter() { $filterableMock = m::mock('phpDocumentor\\Descriptor\\Filter\\Filterable'); $this->filterChainMock->shouldReceive('filter')->with($filterableMock)->andReturn($filterableMock); $this->classFactoryMock->shouldReceive('getChainFor')->with(get_class($filterableMock))->andReturn($this->filterChainMock); $this->assertSame($filterableMock, $this->fixture->filter($filterableMock)); }