FluidTYPO3\Flux\Tests\Unit\View\PreviewViewTest::setUp PHP Method

setUp() public method

public setUp ( ) : void
return void
    public function setUp()
    {
        $GLOBALS['TYPO3_DB'] = $this->getMock('TYPO3\\CMS\\Core\\Database\\DatabaseConnection', array('exec_SELECTgetSingleRow', 'exec_SELECTgetRows', 'exec_SELECT_queryArray', 'fetch_assoc'));
        $GLOBALS['TYPO3_DB']->expects($this->any())->method('exec_SELECTgetSingleRow')->willReturn(Records::$contentRecordWithoutParentAndWithoutChildren);
        $GLOBALS['TYPO3_DB']->expects($this->any())->method('exec_SELECTgetRows')->willReturn(array());
        $GLOBALS['TYPO3_DB']->expects($this->any())->method('exec_SELECT_queryArray')->willReturn($GLOBALS['TYPO3_DB']);
        $GLOBALS['TYPO3_DB']->expects($this->any())->method('fetch_assoc')->willReturn(array());
        $GLOBALS['BE_USER'] = $this->getMock('TYPO3\\CMS\\Core\\Authentication\\BackendUserAuthentication', array('calcPerms'));
        $GLOBALS['BE_USER']->expects($this->any())->method('calcPerms');
        $GLOBALS['LANG'] = $this->getMock('TYPO3\\CMS\\Lang\\LanguageService', array('sL'));
        $GLOBALS['LANG']->expects($this->any())->method('sL')->will($this->returnArgument(0));
        $GLOBALS['TCA'] = array('tt_content' => array('columns' => array('CType' => array('config' => array('items' => array('foo'))))));
    }