diff --git a/tests/_data/e107_config.php.sample b/tests/_data/e107_config.php.sample index 5a4a4eeb0..a1e1e8f3e 100644 --- a/tests/_data/e107_config.php.sample +++ b/tests/_data/e107_config.php.sample @@ -31,7 +31,8 @@ $PLUGINS_DIRECTORY = 'e107_plugins/'; $HANDLERS_DIRECTORY = 'e107_handlers/'; $LANGUAGES_DIRECTORY = 'e107_languages/'; $HELP_DIRECTORY = 'e107_docs/help/'; -$DOWNLOADS_DIRECTORY = 'e107_files/downloads/'; +$MEDIA_DIRECTORY = 'e107_media/'; +$SYSTEM_DIRECTORY = 'e107_system/'; + define('e_MOD_REWRITE',true); -?> diff --git a/tests/unit/ConstantsTest.php b/tests/unit/ConstantsTest.php index 2e5d92831..82f682685 100644 --- a/tests/unit/ConstantsTest.php +++ b/tests/unit/ConstantsTest.php @@ -8,14 +8,53 @@ * */ - use PHPUnit\Framework\TestCase; - class e107ConstantsTest extends TestCase + class e107ConstantsTest extends \Codeception\Test\Unit { - public function teste_BASE() + public function testVerifyE_BASE() { - // todo + $res = defined('e_BASE'); $this->assertTrue($res); } + + public function testVerifyE_SYSTEM_BASE() + { + $res = true; + + if(!defined('e_SYSTEM')) + { + $res = false; + } + elseif(!defined('e_SYSTEM_BASE')) + { + $res = false; + } + elseif(e_SYSTEM_BASE === e_SYSTEM) + { + $res = false; + } + + $this->assertTrue($res); + } + + public function testVerifyE_MEDIA_BASE() + { + $res = true; + + if(!defined('e_MEDIA')) + { + $res = false; + } + elseif(!defined('e_MEDIA_BASE')) + { + $res = false; + } + elseif(e_MEDIA_BASE === e_MEDIA) + { + $res = false; + } + + $this->assertTrue($res); + } }