Skip to content

Commit

Permalink
Updated tests
Browse files Browse the repository at this point in the history
  • Loading branch information
mystralkk committed Jan 24, 2022
1 parent 56c936f commit 0358a47
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 3 deletions.
3 changes: 0 additions & 3 deletions phpunit.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,6 @@
<testsuite name="System">
<directory>tests/system</directory>
</testsuite>
<testsuite name="Language">
<directory>tests/language</directory>
</testsuite>
<!--
<testsuite name="Public_Html">
<directory>tests/public_html</directory>
Expand Down
16 changes: 16 additions & 0 deletions tests/bootstrap.php
Original file line number Diff line number Diff line change
Expand Up @@ -111,3 +111,19 @@ function COM_isEnableDeveloperModeLog($type)

require_once $_CONF['path_system'] . 'classes/Autoload.php';
Autoload::initialize();
Autoload::register(function ($className) {
$className = str_replace('\\', '/', $className);

if (stripos($className, 'Geeklog\\Test\\') === 0) {
$className = __DIR__ . '/system/classes/' . str_ireplace('Geeklog\\Test\\', '', $className);
$path = $className . '.php';
if (is_readable($path)) {
include $className . '.php';
} else {
$path = lcfirst($className) . '.class.php';
if (is_readable($path)) {
include $path;
}
}
}
});

0 comments on commit 0358a47

Please sign in to comment.