diff --git a/library/Bootstrap/UnitBootstrap.php b/library/Bootstrap/UnitBootstrap.php
index <HASH>..<HASH> 100755
--- a/library/Bootstrap/UnitBootstrap.php
+++ b/library/Bootstrap/UnitBootstrap.php
@@ -76,7 +76,7 @@ namespace {
     function getShopBasePath()
     {
         $shopDirectory = OX_BASE_PATH;
-        if (class_exists('oxUnitTestCase', false)) {
+        if (class_exists('oxConfig', false)) {
             $configShopDir = \oxRegistry::getConfig()->getConfigParam('sShopDir');
             $shopDirectory = $configShopDir ? $configShopDir : $shopDirectory;
         }
Check if oxConfig is already loaded

Allow overwriting of sShopDir only when oxConfig class is loaded in getShopBasePath, otherwise it can cause troubles with pure unit tests.
(cherry picked from commit 1d7c8d4)