protected function ViewsDataTest::setupMockedModuleHandler in Zircon Profile 8
Same name and namespace in other branches
- 8.0 core/modules/views/tests/src/Unit/ViewsDataTest.php \Drupal\Tests\views\Unit\ViewsDataTest::setupMockedModuleHandler()
Mocks the basic module handler used for the test.
Return value
\Drupal\Core\Extension\ModuleHandlerInterface|\PHPUnit_Framework_MockObject_MockObject
7 calls to ViewsDataTest::setupMockedModuleHandler()
- ViewsDataTest::testCacheCallsWithoutWarmCacheAndGetAllTables in core/
modules/ views/ tests/ src/ Unit/ ViewsDataTest.php - Tests the cache calls for all views data without a warm cache.
- ViewsDataTest::testCacheCallsWithSameTableMultipleTimes in core/
modules/ views/ tests/ src/ Unit/ ViewsDataTest.php - Tests the cache backend behavior with requesting the same table multiple
- ViewsDataTest::testFetchBaseTables in core/
modules/ views/ tests/ src/ Unit/ ViewsDataTest.php - Tests the fetchBaseTables() method.
- ViewsDataTest::testFullGetCache in core/
modules/ views/ tests/ src/ Unit/ ViewsDataTest.php - Tests the caching of the full views data.
- ViewsDataTest::testGetOnFirstCall in core/
modules/ views/ tests/ src/ Unit/ ViewsDataTest.php - Tests fetching all the views data without a static cache.
File
- core/
modules/ views/ tests/ src/ Unit/ ViewsDataTest.php, line 139 - Contains \Drupal\Tests\views\Unit\ViewsDataTest.
Class
- ViewsDataTest
- @coversDefaultClass \Drupal\views\ViewsData @group views
Namespace
Drupal\Tests\views\UnitCode
protected function setupMockedModuleHandler() {
$views_data = $this
->viewsData();
$this->moduleHandler
->expects($this
->at(0))
->method('getImplementations')
->with('views_data')
->willReturn(array(
'views_test_data',
));
$this->moduleHandler
->expects($this
->at(1))
->method('invoke')
->with('views_test_data', 'views_data')
->willReturn($views_data);
}