$callback(\Closure::
fromCallable([$this, 'viewsData'
]), 'views_test_data'
);
});
} /**
* Tests the fetchBaseTables() method.
*/
public function testFetchBaseTables() { $this->
setupMockedModuleHandler();
$data =
$this->viewsData->
getAll();
$base_tables =
$this->viewsData->
fetchBaseTables();
// Ensure that 'provider' is set for each base table.
foreach (array_keys($base_tables) as $base_table) { $this->
assertEquals('views_test_data',
$data[$base_table]['table'
]['provider'
]);
} // Test the number of tables returned and their order.
$this->
assertCount(6,
$base_tables, 'The correct amount of base tables were returned.'
);
$base_tables_keys =
array_keys($base_tables);
for ($i = 1;
$i <
count($base_tables); ++
$i) { $prev =
$base_tables[$base_tables_keys[$i - 1
]];