added getter and setter to Router to use error layout

This commit is contained in:
Anton Grebnev
2012-06-04 16:08:35 +04:00
parent 29a255776d
commit 90a8cb30e6
2 changed files with 33 additions and 0 deletions

View File

@ -106,4 +106,17 @@ class RouterTest extends PHPUnit_Framework_TestCase
$this->assertTrue($router->routeIsExists($name));
$this->assertFalse($router->routeIsExists($name_is_not_exists));
}
public function testGetDefaultErrorLayout()
{
$router = new Router();
$this->assertSame('ErrorLayout', $router->getErrorLayout());
}
public function testSetErrorLayout()
{
$router = new Router();
$router->setErrorLayout('CustomError');
$this->assertSame('CustomErrorLayout', $router->getErrorLayout());
}
}