/**
  * testIteratorOnlyPassesLocalPathToFilter
  *
  * @return void
  */
 public function testIteratorOnlyPassesLocalPathToFilter()
 {
     $filter = $this->getMock('PHP_Depend_Input_FilterI');
     $filter->expects($this->once())->method('accept')->with(self::equalTo(DIRECTORY_SEPARATOR . basename(__FILE__)));
     $iterator = new PHP_Depend_Input_Iterator(new ArrayIterator(array(new SplFileInfo(__FILE__))), $filter, dirname(__FILE__));
     $iterator->accept();
 }
Ejemplo n.º 2
0
 /**
  * testIteratorPassesAbsolutePathToFilterWhenRootNotMatches
  *
  * @return void
  */
 public function testIteratorPassesAbsolutePathToFilterWhenRootNotMatches()
 {
     $files = new ArrayIterator(array(new SplFileInfo(__FILE__)));
     $filter = $this->getMock('PHP_Depend_Input_FilterI');
     $filter->expects($this->once())->method('accept')->with(self::equalTo(__FILE__), self::equalTo(__FILE__));
     $iterator = new PHP_Depend_Input_Iterator($files, $filter, 'c:\\foo');
     $iterator->accept();
 }