FluidTYPO3\Flux\Tests\Unit\Provider\AbstractProviderTest::canLoadRecordFromDatabase PHP Метод

canLoadRecordFromDatabase() публичный Метод

    public function canLoadRecordFromDatabase()
    {
        $backup = $GLOBALS['TYPO3_DB'];
        $row = Records::$contentRecordWithoutParentAndWithoutChildren;
        $GLOBALS['TYPO3_DB'] = $this->getMock('TYPO3\\CMS\\Core\\Database\\DatabaseConnection', array('exec_SELECTgetSingleRow'));
        $GLOBALS['TYPO3_DB']->expects($this->atLeastOnce())->method('exec_SELECTgetSingleRow')->will($this->returnValue($row));
        $provider = $this->getConfigurationProviderInstance();
        $result = $this->callInaccessibleMethod($provider, 'loadRecordFromDatabase', $row['uid']);
        $this->assertNotNull($result);
        $GLOBALS['TYPO3_DB'] = $backup;
    }