public function setUp()
 {
     parent::setUp();
     $this->mockContentObject = $this->getMock('tslib_cObj', array(), array(), '', FALSE);
     $this->mockConfigurationManager = $this->getMock('Tx_Extbase_Configuration_ConfigurationManagerInterface');
     $this->mockConfigurationManager->expects($this->any())->method('getContentObject')->will($this->returnValue($this->mockContentObject));
     $this->viewHelper = $this->getMock('Tx_Fluid_ViewHelpers_Format_CropViewHelper', array('renderChildren'));
     $this->viewHelper->injectConfigurationManager($this->mockConfigurationManager);
     $this->viewHelper->expects($this->once())->method('renderChildren')->will($this->returnValue('Some Content'));
 }
 /**
  * @test
  * @expectedException Tx_Extbase_MVC_Exception
  */
 public function buildThrowsExceptionIfControllerConfigurationHasNoDefaultActionDefined()
 {
     $this->configuration['controllerConfiguration']['TheFirstController'] = array();
     $this->mockConfigurationManager->expects($this->any())->method('getConfiguration')->will($this->returnValue($this->configuration));
     $this->requestBuilder->injectConfigurationManager($this->mockConfigurationManager);
     $this->requestBuilder->build();
 }
 /**
  * @test
  * @author Bastian Waidelich <*****@*****.**>
  */
 public function constructorCreatesContentObjectIfItIsNotSpecified()
 {
     // FIXME should be compared with identicalTo() - but that does not seem to work
     $this->mockConfigurationManager->expects($this->once())->method('setContentObject')->with($this->equalTo($this->mockContentObject));
     new Tx_Fluid_View_StandaloneView();
 }