Author: Elliot Levin (elliotlevin@hotmail.com)
コード例 #1
0
ファイル: ParserTest.php プロジェクト: timetoogo/pinq
 protected final function assertParsedAs(callable $function, array $expressions)
 {
     if ($this->currentImplementation === null) {
         throw new \Exception('Please remember to use the @dataProvider annotation to test all the implementations.');
     }
     $this->assertEquals($expressions, $this->currentImplementation->parse($this->currentImplementation->getReflection($function))->getBodyExpressions());
 }
コード例 #2
0
ファイル: SimpleParserTest.php プロジェクト: timetoogo/pinq
 /**
  * @dataProvider parsers
  * @expectedException \Pinq\Parsing\InvalidFunctionException
  */
 public function testEvaledFunctionIsRejected(IParser $parser)
 {
     $evaledFunction = eval('return function () {};');
     $parser->parse($parser->getReflection($evaledFunction));
 }