/** * @test */ public function testEvaluateCallsInvoker() { $invoker = $this->getMock(ViewHelperInvoker::class, ['invoke']); $invoker->expects($this->once())->method('invoke')->willReturn('test'); $this->renderingContext->setViewHelperInvoker($invoker); $node = new ViewHelperNode($this->renderingContext, 'f', 'vh', ['foo' => 'bar'], new ParsingState()); $result = $node->evaluate($this->renderingContext); $this->assertEquals('test', $result); }