diff --git a/core/modules/node/lib/Drupal/node/Tests/NodeAdminTest.php b/core/modules/node/lib/Drupal/node/Tests/NodeAdminTest.php index d9506c1..906ffc7 100644 --- a/core/modules/node/lib/Drupal/node/Tests/NodeAdminTest.php +++ b/core/modules/node/lib/Drupal/node/Tests/NodeAdminTest.php @@ -43,10 +43,15 @@ function testContentAdminSort() { } // Test that the default sort by node.changed DESC actually fires properly. + // @todo: These nodes have all the same changed date, adding the distinct() + // Fixing by adding a secondary sort on the node id to produce the + // expected behavior. Consider manually setting an older changed date to + // test this with useful data. $nodes_query = db_select('node_property_data', 'npd') ->distinct(TRUE) ->fields('npd', array('nid')) ->orderBy('changed', 'DESC') + ->orderBy('nid', 'ASC') ->execute() ->fetchCol(); @@ -56,16 +61,6 @@ function testContentAdminSort() { $nodes_form[] = $input; } - debug($nodes_query); - - debug($nodes_form); - - // UGLY TESTBOT DEBUG START - foreach ($nodes_query as $key => $value) { - $this->assert(false, 'DEBUG: ' . $nodes_query[$key] . ' equals ' . $nodes_form[$key]); - } - // UGLY TESTBOT DEBUG END - $this->assertEqual($nodes_query, $nodes_form, 'Nodes are sorted in the form according to the default query.'); // Compare the rendered HTML node list to a query for the nodes ordered by diff --git a/core/modules/views/lib/Drupal/views/Tests/UI/SettingsTest.php b/core/modules/views/lib/Drupal/views/Tests/UI/SettingsTest.php index 5675a24..9507d12 100644 --- a/core/modules/views/lib/Drupal/views/Tests/UI/SettingsTest.php +++ b/core/modules/views/lib/Drupal/views/Tests/UI/SettingsTest.php @@ -111,12 +111,9 @@ function testEditUI() { $this->drupalPost(NULL, array(), t('Update preview')); $xpath = $this->xpath('//div[@class="views-query-info"]//pre'); - // UGLY TESTBOT DEBUG START - debug($xpath); - // UGLY TESTBOT DEBUG END $this->assertEqual(count($xpath), 1, 'The views sql is shown.'); $this->assertFalse(strpos($xpath[0], 'db_condition_placeholder') !== FALSE, 'No placeholders are shown in the views sql.'); - $this->assertTrue(strpos($xpath[0], "node.status = '1'") !== FALSE, 'The placeholders in the views sql is replace by the actual value.'); + $this->assertTrue(strpos($xpath[0], "node_property_data.status = '1'") !== FALSE, 'The placeholders in the views sql is replace by the actual value.'); } }