Skip to content

Commit dbdb763

Browse files
committed
use SUPPORTPATH constant int classmap definition as well
1 parent 60c467a commit dbdb763

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

system/Config/AutoloadConfig.php

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -181,9 +181,13 @@ public function __construct()
181181
'CodeIgniter\View\Parser' => BASEPATH . 'View/Parser.php',
182182
'CodeIgniter\View\Cell' => BASEPATH . 'View/Cell.php',
183183
'Zend\Escaper\Escaper' => BASEPATH . 'ThirdParty/ZendEscaper/Escaper.php',
184-
'CodeIgniter\Log\TestLogger' => SUPPORTPATH . 'Log/TestLogger.php',
185-
'CIDatabaseTestCase' => SUPPORTPATH . 'CIDatabaseTestCase.php',
186184
];
185+
186+
if (isset($_SERVER['CI_ENVIRONMENT']) && $_SERVER['CI_ENVIRONMENT'] === 'testing')
187+
{
188+
$this->classmap['CodeIgniter\Log\TestLogger'] = SUPPORTPATH . 'Log/TestLogger.php';
189+
$this->classmap['CIDatabaseTestCase'] = SUPPORTPATH . 'CIDatabaseTestCase.php';
190+
}
187191
}
188192

189193
//--------------------------------------------------------------------

0 commit comments

Comments
 (0)