Пример #1
0
 /**
  * @param mixed $input
  * @param boolean $expected
  * @test
  * @dataProvider getStandardInputTypes
  */
 public function acceptsStandardTypesAsInput($input, $expected)
 {
     $node = new BooleanNode($input);
     $this->assertEquals($expected, $node->evaluate($this->renderingContext));
 }
Пример #2
0
 /**
  * @param NodeInterface $node
  * @param RenderingContextInterface $renderingContext
  * @return boolean
  */
 public static function createFromNodeAndEvaluate(NodeInterface $node, RenderingContextInterface $renderingContext)
 {
     $booleanNode = new BooleanNode($node);
     return $booleanNode->evaluate($renderingContext);
 }