From c56d256cf0c178a7b8f3b96ce8e31afeb6ea8130 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Tantau?= Date: Tue, 17 Jan 2017 14:53:11 +0100 Subject: [PATCH] Set empty routes for test on current store The test it_returns_an_empty_array_when_no_routes_are_configured might fail if the current store is default instead of admin. Simply setting the testsettings on the current store instead of admin makes the test pass. --- .../community/Studioforty9/Recaptcha/Test/Helper/Data.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/code/community/Studioforty9/Recaptcha/Test/Helper/Data.php b/app/code/community/Studioforty9/Recaptcha/Test/Helper/Data.php index 814191b..a29415b 100644 --- a/app/code/community/Studioforty9/Recaptcha/Test/Helper/Data.php +++ b/app/code/community/Studioforty9/Recaptcha/Test/Helper/Data.php @@ -53,13 +53,13 @@ public function it_returns_an_empty_array_when_no_routes_are_configured() // We have to reset the routes in order to run this test $keyRoutes = Studioforty9_Recaptcha_Helper_Data::MODULE_KEY_ROUTES; $oldRoutes = Mage::getStoreConfig($keyRoutes); - Mage::app()->getStore(0)->setConfig($keyRoutes, ',,,'); + Mage::app()->getStore()->setConfig($keyRoutes, ',,,'); $routes = $this->helper->getEnabledRoutes(); $this->assertInternalType('array', $routes); $this->assertEmpty($routes); - Mage::app()->getStore(0)->setConfig($keyRoutes, $oldRoutes); + Mage::app()->getStore()->setConfig($keyRoutes, $oldRoutes); } }