コード例 #1
0
ファイル: TextNodeTest.php プロジェクト: mbrodala/Fluid
 /**
  * @test
  */
 public function renderReturnsSameStringAsGivenInConstructor()
 {
     $string = 'I can work quite effectively in a train!';
     $node = new TextNode($string);
     $renderingContext = new RenderingContextFixture();
     $this->assertEquals($node->evaluate($renderingContext), $string, 'The rendered string of a text node is not the same as the string given in the constructor.');
 }
コード例 #2
0
ファイル: TextNodeTest.php プロジェクト: bwaidelich/Fluid
 /**
  * @test
  */
 public function renderReturnsSameStringAsGivenInConstructor()
 {
     $string = 'I can work quite effectively in a train!';
     $node = new TextNode($string);
     $this->assertEquals($node->evaluate($this->getMock('TYPO3Fluid\\Fluid\\Core\\Rendering\\RenderingContext')), $string, 'The rendered string of a text node is not the same as the string given in the constructor.');
 }
コード例 #3
0
ファイル: NodeConverter.php プロジェクト: namelesscoder/fluid
 /**
  * @param TextNode $node
  * @return array
  * @see convert()
  */
 protected function convertTextNode(TextNode $node)
 {
     return array('initialization' => '', 'execution' => '\'' . $this->escapeTextForUseInSingleQuotes($node->getText()) . '\'');
 }