From a4d44b71c1f13fd9410d1ec8710652e636fbf1e5 Mon Sep 17 00:00:00 2001
From: Demian Katz <demian.katz@villanova.edu>
Date: Thu, 22 Oct 2015 13:58:42 -0400
Subject: [PATCH] Fixed broken test.

---
 .../src/VuFindTest/Mink/FavoritesTest.php              | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

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 028ec72fc12..98b242ef6da 100644
--- a/module/VuFind/tests/integration-tests/src/VuFindTest/Mink/FavoritesTest.php
+++ b/module/VuFind/tests/integration-tests/src/VuFindTest/Mink/FavoritesTest.php
@@ -79,6 +79,12 @@ class FavoritesTest extends \VuFindTest\Unit\MinkTestCase
         return $page;
     }
 
+    protected function stripHash($url)
+    {
+        $parts = explode('#', $url);
+        return $parts[0];
+    }
+
     public function testAddRecordToFavoritesNewAccount()
     {
         // Change the theme:
@@ -122,10 +128,10 @@ class FavoritesTest extends \VuFindTest\Unit\MinkTestCase
         $this->assertNotNull($page->find('css', '.alert.alert-info')); // .success?
         $page->find('css', '.modal-body .btn.btn-default')->click();
         // Check list page
-        $recordURL = $session->getCurrentUrl();
+        $recordURL = $this->stripHash($session->getCurrentUrl());
         $page->find('css', '#savedLists a')->click();
         $page->find('css', '.resultItemLine1 a')->click();
-        $this->assertEquals($session->getCurrentUrl(), $recordURL);
+        $this->assertEquals($recordURL, $this->stripHash($session->getCurrentUrl()));
         $page->find('css', '.logoutOptions a[title="Log Out"]')->click();
         $session->stop();
     }
-- 
GitLab