/** * @test */ public function renderReturnsSameStringAsGivenInConstructor() { $string = 'I can work quite effectively in a train!'; $node = new TextNode($string); $this->assertEquals($node->evaluate($this->getMock('NamelessCoder\\Fluid\\Core\\Rendering\\RenderingContext')), $string, 'The rendered string of a text node is not the same as the string given in the constructor.'); }
/** * @param TextNode $node * @return array * @see convert() */ protected function convertTextNode(TextNode $node) { return array('initialization' => '', 'execution' => '\'' . $this->escapeTextForUseInSingleQuotes($node->getText()) . '\''); }