/**
  * @test
  * @dataProvider renderDataProvider()
  * @param string $expectedResult
  * @param array $flashMessages
  * @param string $class
  * @return void
  */
 public function renderTests($expectedResult, array $flashMessages = array(), $class = NULL)
 {
     $this->mockFlashMessageContainer->expects($this->once())->method('getMessagesAndFlush')->will($this->returnValue($flashMessages));
     $this->mockTagBuilder->expects($this->once())->method('setContent')->with($expectedResult);
     if ($class !== NULL) {
         $this->viewHelper->_set('arguments', array('class' => $class));
     }
     $this->viewHelper->render();
 }
 /**
  * @test
  */
 public function thumbnailHeightMightExceedImageHeightIfAllowUpScalingIsTrue()
 {
     $this->mockTagBuilder->expects($this->once())->method('render');
     $this->mockTagBuilder->expects($this->once())->method('addAttributes')->with(array('width' => null, 'height' => 456, 'src' => null));
     $this->mockImage->expects($this->once())->method('getThumbnail')->with(100, 456, 'inset')->will($this->returnValue($this->mockThumbnail));
     $this->viewHelper->render($this->mockImage, NULL, 456, FALSE, TRUE);
 }
 /**
  * @test
  */
 public function callingRenderReturnsTagBuildersRenderResult()
 {
     $this->tagBuilder->expects($this->once())->method('render')->will($this->returnValue('renderingResult'));
     $this->assertSame('renderingResult', $this->viewHelper->render('path'));
 }