示例#1
0
 /**
  * @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));
 }
 /**
  * Analyzes a Descriptor and alters its state based on its state or even removes the descriptor.
  *
  * @param Filterable $descriptor
  *
  * @return Filterable
  */
 public function filter(Filterable $descriptor)
 {
     return $this->filter->filter($descriptor);
 }