From 2b5d64241d955ada9f5b755e0561c5ff13077aea Mon Sep 17 00:00:00 2001 From: Daniel Wehner Date: Mon, 27 Aug 2012 17:21:24 +0200 Subject: [PATCH] Remove and comment out unneeded tests. --- lib/Drupal/views/Tests/ViewTest.php | 14 -------------- lib/Drupal/views/Tests/WizardBasicTest.php | 9 +++++---- .../views/Tests/WizardDefaultViewsTest.php | 19 ++++++++++--------- 3 files changed, 15 insertions(+), 27 deletions(-) diff --git a/lib/Drupal/views/Tests/ViewTest.php b/lib/Drupal/views/Tests/ViewTest.php index 6593f8fc0d..12c5a0f351 100644 --- a/lib/Drupal/views/Tests/ViewTest.php +++ b/lib/Drupal/views/Tests/ViewTest.php @@ -70,20 +70,6 @@ function assertViewDestroy($view) { $this->assertEqual($view->attachment_after, ''); } - function testDelete() { - // Delete a database view - $view = $this->view_test_delete(); - $view->save(); - $view = views_get_view($view->name); - $view->delete(); - - $view = views_get_view($view->name); - $this->assertNotNull($view, 'Make sure that the old view is still in the static cache.'); - - $view = views_get_view($view->name, TRUE); - $this->assertNull($view, "Make sure that the old view gets cleared by the reset parameter."); - } - function testValidate() { // Test a view with multiple displays. // Validating a view shouldn't change the active display. diff --git a/lib/Drupal/views/Tests/WizardBasicTest.php b/lib/Drupal/views/Tests/WizardBasicTest.php index 7d95aeba62..6daa4267f5 100644 --- a/lib/Drupal/views/Tests/WizardBasicTest.php +++ b/lib/Drupal/views/Tests/WizardBasicTest.php @@ -126,10 +126,11 @@ function testViewsWizardAndListing() { $this->assertNoText($node2->label()); // Check if the export screen works. - $this->drupalGet('admin/structure/views/view/' . $view3['name'] . '/export'); - $this->assertRaw('$view = new Drupal\views\View();'); - $this->assertRaw($view3['human_name']); - $this->assertRaw($view3['description']); + // @todo Remove this once the export is gone. + // $this->drupalGet('admin/structure/views/view/' . $view3['name'] . '/export'); + // $this->assertRaw('$view = new Drupal\views\View(array(), "view");'); + // $this->assertRaw($view3['human_name']); + // $this->assertRaw($view3['description']); // Make sure the listing page doesn't show disabled default views. $this->assertNoText('tracker', t('Default tracker view does not show on the listing page.')); diff --git a/lib/Drupal/views/Tests/WizardDefaultViewsTest.php b/lib/Drupal/views/Tests/WizardDefaultViewsTest.php index 501fcd06ee..bcb066e214 100644 --- a/lib/Drupal/views/Tests/WizardDefaultViewsTest.php +++ b/lib/Drupal/views/Tests/WizardDefaultViewsTest.php @@ -39,9 +39,10 @@ function testDefaultViews() { $this->assertLinkByHref($edit_href); // It should not be possible to revert the view yet. - $this->assertNoLink(t('Revert')); - $revert_href = 'admin/structure/views/view/frontpage/revert'; - $this->assertNoLinkByHref($revert_href); + // @todo Figure out how to handle this with the new configuration system. + // $this->assertNoLink(t('Revert')); + // $revert_href = 'admin/structure/views/view/frontpage/revert'; + // $this->assertNoLinkByHref($revert_href); // Edit the view and change the title. Make sure that the new title is // displayed. @@ -54,12 +55,12 @@ function testDefaultViews() { // It should now be possible to revert the view. Do that, and make sure the // view title we added above no longer is displayed. - $this->drupalGet('admin/structure/views'); - $this->assertLink(t('Revert')); - $this->assertLinkByHref($revert_href); - $this->drupalPost($revert_href, array(), t('Revert')); - $this->drupalGet('frontpage'); - $this->assertNoText($new_title); + // $this->drupalGet('admin/structure/views'); + // $this->assertLink(t('Revert')); + // $this->assertLinkByHref($revert_href); + // $this->drupalPost($revert_href, array(), t('Revert')); + // $this->drupalGet('frontpage'); + // $this->assertNoText($new_title); // Now disable the view, and make sure it stops appearing on the main view // listing page but instead goes back to displaying on the disabled views -- GitLab