/** * @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)); }
/** * @param NodeInterface $node * @param RenderingContextInterface $renderingContext * @return boolean */ public static function createFromNodeAndEvaluate(NodeInterface $node, RenderingContextInterface $renderingContext) { $booleanNode = new BooleanNode($node); return $booleanNode->evaluate($renderingContext); }