From 2477b4729e1532e9bb50b1e8162c9fe6b8824dc2 Mon Sep 17 00:00:00 2001 From: Demian Katz <demian.katz@villanova.edu> Date: Mon, 3 Jul 2017 13:57:00 -0400 Subject: [PATCH] Don't hard-code theme into tests. --- .../VuFindTest/Mink/AdvancedSearchTest.php | 5 ---- .../src/VuFindTest/Mink/FavoritesTest.php | 30 ------------------- .../src/VuFindTest/Mink/RecordActionsTest.php | 19 ++---------- 3 files changed, 3 insertions(+), 51 deletions(-) diff --git a/module/VuFind/tests/integration-tests/src/VuFindTest/Mink/AdvancedSearchTest.php b/module/VuFind/tests/integration-tests/src/VuFindTest/Mink/AdvancedSearchTest.php index 0dd49d8291a..0c372fd7782 100644 --- a/module/VuFind/tests/integration-tests/src/VuFindTest/Mink/AdvancedSearchTest.php +++ b/module/VuFind/tests/integration-tests/src/VuFindTest/Mink/AdvancedSearchTest.php @@ -94,11 +94,6 @@ class AdvancedSearchTest extends \VuFindTest\Unit\MinkTestCase */ public function testAdvancedSearch() { - // Change the theme: - $this->changeConfigs( - ['config' => ['Site' => ['theme' => 'bootstrap3']]] - ); - // Go to the advanced search page $session = $this->getMinkSession(); $path = '/Search/Advanced'; diff --git a/module/VuFind/tests/integration-tests/src/VuFindTest/Mink/FavoritesTest.php b/module/VuFind/tests/integration-tests/src/VuFindTest/Mink/FavoritesTest.php index c295995c77c..817b9c45434 100644 --- a/module/VuFind/tests/integration-tests/src/VuFindTest/Mink/FavoritesTest.php +++ b/module/VuFind/tests/integration-tests/src/VuFindTest/Mink/FavoritesTest.php @@ -113,11 +113,6 @@ class FavoritesTest extends \VuFindTest\Unit\MinkTestCase */ public function testAddRecordToFavoritesNewAccount() { - // Change the theme: - $this->changeConfigs( - ['config' => ['Site' => ['theme' => 'bootstrap3']]] - ); - $page = $this->gotoRecord(); $this->findCss($page, '.save-record')->click(); @@ -170,11 +165,6 @@ class FavoritesTest extends \VuFindTest\Unit\MinkTestCase */ public function testAddRecordToFavoritesLogin() { - // Change the theme: - $this->changeConfigs( - ['config' => ['Site' => ['theme' => 'bootstrap3']]] - ); - $page = $this->gotoRecord(); $this->findCss($page, '.save-record')->click(); @@ -222,11 +212,6 @@ class FavoritesTest extends \VuFindTest\Unit\MinkTestCase */ public function testAddRecordToFavoritesLoggedIn() { - // Change the theme: - $this->changeConfigs( - ['config' => ['Site' => ['theme' => 'bootstrap3']]] - ); - $page = $this->gotoRecord(); // Login $this->findCss($page, '#loginOptions a')->click(); @@ -251,11 +236,6 @@ class FavoritesTest extends \VuFindTest\Unit\MinkTestCase */ public function testAddSearchItemToFavoritesNewAccount() { - // Change the theme: - $this->changeConfigs( - ['config' => ['Site' => ['theme' => 'bootstrap3']]] - ); - $page = $this->gotoSearch(); $this->findCss($page, '.save-record')->click(); @@ -319,11 +299,6 @@ class FavoritesTest extends \VuFindTest\Unit\MinkTestCase */ public function testAddSearchItemToFavoritesLogin() { - // Change the theme: - $this->changeConfigs( - ['config' => ['Site' => ['theme' => 'bootstrap3']]] - ); - $page = $this->gotoSearch(); $this->findCss($page, '.save-record')->click(); @@ -372,11 +347,6 @@ class FavoritesTest extends \VuFindTest\Unit\MinkTestCase */ public function testAddSearchItemToFavoritesLoggedIn() { - // Change the theme: - $this->changeConfigs( - ['config' => ['Site' => ['theme' => 'bootstrap3']]] - ); - $page = $this->gotoSearch(); // Login $this->findCss($page, '#loginOptions a')->click(); diff --git a/module/VuFind/tests/integration-tests/src/VuFindTest/Mink/RecordActionsTest.php b/module/VuFind/tests/integration-tests/src/VuFindTest/Mink/RecordActionsTest.php index 2df87d86767..35a0ba12960 100644 --- a/module/VuFind/tests/integration-tests/src/VuFindTest/Mink/RecordActionsTest.php +++ b/module/VuFind/tests/integration-tests/src/VuFindTest/Mink/RecordActionsTest.php @@ -102,11 +102,6 @@ class RecordActionsTest extends \VuFindTest\Unit\MinkTestCase */ public function testAddComment() { - // Change the theme: - $this->changeConfigs( - ['config' => ['Site' => ['theme' => 'bootstrap3']]] - ); - // Go to a record view $page = $this->gotoRecord(); // Click add comment without logging in @@ -152,11 +147,6 @@ class RecordActionsTest extends \VuFindTest\Unit\MinkTestCase */ public function testAddTag() { - // Change the theme: - $this->changeConfigs( - ['config' => ['Site' => ['theme' => 'bootstrap3']]] - ); - // Go to a record view $page = $this->gotoRecord(); // Click to add tag @@ -249,11 +239,10 @@ class RecordActionsTest extends \VuFindTest\Unit\MinkTestCase */ public function testAddSensitiveTag() { - // Change the theme: + // Set up configs: $this->changeConfigs( [ 'config' => [ - 'Site' => ['theme' => 'bootstrap3'], 'Social' => ['case_sensitive_tags' => 'true'] ] ] @@ -284,11 +273,10 @@ class RecordActionsTest extends \VuFindTest\Unit\MinkTestCase */ public function testEmail() { - // Change the theme: + // Set up configs: $this->changeConfigs( [ 'config' => [ - 'Site' => ['theme' => 'bootstrap3'], 'Mail' => ['testOnly' => 1], ] ] @@ -357,11 +345,10 @@ class RecordActionsTest extends \VuFindTest\Unit\MinkTestCase */ public function testSMS() { - // Change the theme: + // Set up configs: $this->changeConfigs( [ 'config' => [ - 'Site' => ['theme' => 'bootstrap3'], 'Mail' => ['testOnly' => 1], ] ] -- GitLab