mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-04-27 14:22:54 +09:00
Fix path normalization problem
This commit is contained in:
parent
6085b82d19
commit
fefd3dd895
8 changed files with 62 additions and 18 deletions
|
|
@ -51,4 +51,17 @@ class TemplateTest extends \Codeception\Test\Unit
|
|||
$target = '/rhymix/foo/bar.gif';
|
||||
$this->assertEquals($target, $tmpl->convertPath($source));
|
||||
}
|
||||
|
||||
public function testNormalizePath()
|
||||
{
|
||||
$tmpl = new \Rhymix\Framework\Template('./tests/_data/template', 'empty.html');
|
||||
|
||||
$source = '/rhymix/foo/bar//../hello/world\\..';
|
||||
$target = '/rhymix/foo/hello';
|
||||
$this->assertEquals($target, $tmpl->normalizePath($source));
|
||||
|
||||
$source = '../foo\\bar/../baz/';
|
||||
$target = '../foo/baz/';
|
||||
$this->assertEquals($target, $tmpl->normalizePath($source));
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue