loadRouter() public method

Load a router
public loadRouter ( Router $router ) : Project
$router Pop\Mvc\Router
return Project
Beispiel #1
0
 public function testLoadRouter()
 {
     $p = new Project(new Config(array('databases' => array('testdb' => Db::factory('Sqlite', array('database' => __DIR__ . '/../tmp/test.sqlite'))), 'defaultDb' => 'testdb')), array('Test' => new Config(array('some' => 'thing'))));
     $p->loadRouter(new Router(array('Pop\\Mvc\\Controller' => new Controller())));
     $this->assertInstanceOf('Pop\\Mvc\\Router', $p->router());
 }