diff --git a/core/modules/views/lib/Drupal/views/Tests/Plugin/DisplayTest.php b/core/modules/views/lib/Drupal/views/Tests/Plugin/DisplayTest.php index cb7f2c5..077949a 100644 --- a/core/modules/views/lib/Drupal/views/Tests/Plugin/DisplayTest.php +++ b/core/modules/views/lib/Drupal/views/Tests/Plugin/DisplayTest.php @@ -55,7 +55,7 @@ public function setUp() { * * @see Drupal\views_test_data\Plugin\views\display\DisplayTest */ - function _testDisplayPlugin() { + function testDisplayPlugin() { $view = views_get_view('test_view'); // Add a new 'display_test' display and test it's there. @@ -119,7 +119,7 @@ function _testDisplayPlugin() { /** * Tests the overriding of filter_groups. */ - public function _testFilterGroupsOverriding() { + public function testFilterGroupsOverriding() { $view = views_get_view('test_filter_groups'); $view->initDisplay(); @@ -132,7 +132,7 @@ public function _testFilterGroupsOverriding() { /** * Tests the getAttachedDisplays method. */ - public function _testGetAttachedDisplays() { + public function testGetAttachedDisplays() { $view = views_get_view('test_get_attach_displays'); // Both the feed_1 and the feed_2 display are attached to the page display. @@ -156,28 +156,22 @@ public function testReadMore() { $output = drupal_render($output); $this->drupalSetContent($output); - debug($output); $result = $this->xpath('//div[@class=:class]/a', array(':class' => 'more-link')); $this->assertEqual($result[0]->attributes()->href, url('test_display_more'), 'The right more link is shown.'); - debug($result); - $this->assertEqual($result[0][0], $expected_more_text, 'The right link text is shown.'); + $this->assertEqual(trim($result[0][0]), $expected_more_text, 'The right link text is shown.'); // Test the renderMoreLink method directly. This could be directly unit // tested. $more_link = $view->display_handler->renderMoreLink(); $this->drupalSetContent($more_link); - debug($more_link); $result = $this->xpath('//div[@class=:class]/a', array(':class' => 'more-link')); $this->assertEqual($result[0]->attributes()->href, url('test_display_more'), 'The right more link is shown.'); - debug($result); - $this->assertEqual($result[0][0], $expected_more_text, 'The right link text is shown.'); + $this->assertEqual(trim($result[0][0]), $expected_more_text, 'The right link text is shown.'); // Test the useMoreText method directly. This could be directly unit // tested. $more_text = $view->display_handler->useMoreText(); $this->assertEqual($more_text, $expected_more_text, 'The right more text is chosen.'); - - } }