mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-05-22 05:15:29 +09:00
Add basic structure of unit test for Router
This commit is contained in:
parent
fda931ede0
commit
3a13b51068
1 changed files with 33 additions and 0 deletions
33
tests/unit/framework/RouterTest.php
Normal file
33
tests/unit/framework/RouterTest.php
Normal file
|
|
@ -0,0 +1,33 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
class RouterTest extends \Codeception\TestCase\Test
|
||||||
|
{
|
||||||
|
public function testGetRewriteLevel()
|
||||||
|
{
|
||||||
|
Rhymix\Framework\Config::set('url.rewrite', null);
|
||||||
|
Rhymix\Framework\Config::set('use_rewrite', false);
|
||||||
|
$this->assertEquals(0, Rhymix\Framework\Router::getRewriteLevel());
|
||||||
|
|
||||||
|
Rhymix\Framework\Config::set('url.rewrite', 1);
|
||||||
|
Rhymix\Framework\Config::set('use_rewrite', false);
|
||||||
|
$this->assertEquals(1, Rhymix\Framework\Router::getRewriteLevel());
|
||||||
|
|
||||||
|
Rhymix\Framework\Config::set('url.rewrite', 1);
|
||||||
|
Rhymix\Framework\Config::set('use_rewrite', true);
|
||||||
|
$this->assertEquals(1, Rhymix\Framework\Router::getRewriteLevel());
|
||||||
|
|
||||||
|
Rhymix\Framework\Config::set('url.rewrite', 2);
|
||||||
|
Rhymix\Framework\Config::set('use_rewrite', true);
|
||||||
|
$this->assertEquals(2, Rhymix\Framework\Router::getRewriteLevel());
|
||||||
|
}
|
||||||
|
|
||||||
|
public function testGetURL()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public function testParseURL()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue