addHandler() 공개 메소드

public addHandler ( closure $handler, array $arguments, $priority )
$handler closure
$arguments array
예제 #1
0
파일: parser.php 프로젝트: ronan-gloo/atoum
 public function testResetHandlers()
 {
     $this->assert->if($parser = new script\arguments\parser())->then->object($parser->resetHandlers())->isIdenticalTo($parser)->array($parser->getHandlers())->isEmpty()->array($parser->getPriorities())->isEmpty()->if($parser->addHandler(function ($script, $argument, $values) {
     }, array('-a')))->then->object($parser->resetHandlers())->isIdenticalTo($parser)->array($parser->getHandlers())->isEmpty()->array($parser->getPriorities())->isEmpty();
 }