public function testDatabase() { $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'))), new Router(array('Pop\\Mvc\\Controller' => new Controller()))); $this->assertInstanceOf('Pop\\Db\\Db', $p->database('testdb')); $this->assertNull($p->database('baddb')); }