/**
  * @test
  * @dataProvider dataProvider
  */
 public function renderTestsWithRenderChildrenFallback($value, array $options, $expectedResult)
 {
     $this->viewHelper->expects($this->any())->method('renderChildren')->will($this->returnValue($value));
     $this->assertSame($expectedResult, $this->viewHelper->render(NULL, isset($options['keepQuotes']) ? $options['keepQuotes'] : FALSE, isset($options['encoding']) ? $options['encoding'] : 'UTF-8', isset($options['doubleEncode']) ? $options['doubleEncode'] : TRUE));
 }
コード例 #2
0
 /**
  * @test
  */
 public function renderUsesChildnodesAsSourceIfSpecified()
 {
     $this->viewHelper->expects($this->atLeastOnce())->method('renderChildren')->will($this->returnValue('Some string'));
     $actualResult = $this->viewHelper->render();
     $this->assertEquals('Some string', $actualResult);
 }