diff --git a/tests/unit/framework/TemplateTest.php b/tests/unit/framework/TemplateTest.php index 1814cb6f8..420134e96 100644 --- a/tests/unit/framework/TemplateTest.php +++ b/tests/unit/framework/TemplateTest.php @@ -5,6 +5,7 @@ class TemplateTest extends \Codeception\Test\Unit public function _before() { Context::init(); + $this->baseurl = '/' . basename(dirname(dirname(dirname(__DIR__)))) . '/'; } public function testIsRelativePath() @@ -48,7 +49,7 @@ class TemplateTest extends \Codeception\Test\Unit $this->assertEquals($target, $tmpl->convertPath($source)); $source = '^/foo/bar.gif'; - $target = '/rhymix/foo/bar.gif'; + $target = $this->baseurl . 'foo/bar.gif'; $this->assertEquals($target, $tmpl->convertPath($source)); } diff --git a/tests/unit/framework/parsers/TemplateParserV2Test.php b/tests/unit/framework/parsers/TemplateParserV2Test.php index 9be965cf0..495dfb2b4 100644 --- a/tests/unit/framework/parsers/TemplateParserV2Test.php +++ b/tests/unit/framework/parsers/TemplateParserV2Test.php @@ -1145,9 +1145,9 @@ class TemplateParserV2Test extends \Codeception\Test\Unit // Check that resource is loaded $list = \Context::getJsFile('body'); - $this->assertStringContainsString('/rhymix/common/js/plugins/ckeditor/', array_first($list)['file']); + $this->assertStringContainsString('/common/js/plugins/ckeditor/', array_first($list)['file']); $list = \Context::getCssFile(); - $this->assertStringContainsString('/rhymix/tests/_data/template/css/style.scss', array_first($list)['file']); + $this->assertStringContainsString('/tests/_data/template/css/style.scss', array_first($list)['file']); } public function testCompileLang() @@ -1240,7 +1240,7 @@ class TemplateParserV2Test extends \Codeception\Test\Unit ); $list = \Context::getJsFile(); - $this->assertStringContainsString('/rhymix/tests/_data/template/js/test.js', array_last($list)['file']); + $this->assertStringContainsString('/tests/_data/template/js/test.js', array_last($list)['file']); } /**