Пример #1
0
 public function accept()
 {
     switch ($this->getInnerIterator()->current()->getBasename()) {
         case 'GPATH':
         case 'GRTAGS':
         case 'GTAGS':
             return false;
         default:
             return parent::accept();
     }
 }
Пример #2
0
 public function test__accept()
 {
     $this->mockGenerator->shunt('__construct')->if($iteratorController = new mock\controller())->and($iteratorController->__construct = function () {
     })->and($filter = new recursives\dot(new \mock\recursiveDirectoryIterator(uniqid())))->and($iteratorController->current = new \splFileInfo(uniqid()))->then->boolean($filter->accept())->isTrue()->if($iteratorController->current = new \splFileInfo('.' . uniqid()))->then->boolean($filter->accept())->isFalse()->if($iteratorController->current = new \splFileInfo(uniqid() . DIRECTORY_SEPARATOR . '.' . uniqid()))->then->boolean($filter->accept())->isFalse();
 }