Commit f559c640 authored by catch's avatar catch
Browse files

Issue #2191533 by lowjoel, Berdir: Fixing ViewsDataTest::testFetchBaseTables...

Issue #2191533 by lowjoel, Berdir: Fixing ViewsDataTest::testFetchBaseTables to correctly check for sorting order.
parent 4bbef0e0
......@@ -137,7 +137,12 @@ public function testFetchBaseTables() {
// Test the number of tables returned and their order.
$this->assertCount(6, $base_tables, 'The correct amount of base tables were returned.');
$this->assertSame(array('views_test_data_3', 'views_test_data_4', 'views_test_data_6', 'views_test_data', 'views_test_data_5', 'views_test_data_2'), array_keys($base_tables), 'The tables are sorted as expected.');
$base_tables_keys = array_keys($base_tables);
for ($i = 1; $i < count($base_tables); ++$i) {
$prev = $base_tables[$base_tables_keys[$i - 1]];
$current = $base_tables[$base_tables_keys[$i]];
$this->assertTrue($prev['weight'] <= $current['weight'] && $prev['title'] <= $prev['title'], 'The tables are sorted as expected.');
}
// Test the values returned for each base table.
$defaults = array(
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment