mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-05 09:41:40 +09:00
Fix unit test error when repository name is not "rhymix"
This commit is contained in:
parent
99de7db35a
commit
a128b6e3cb
2 changed files with 5 additions and 4 deletions
|
|
@ -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));
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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']);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue