/** * Tests getting handler by name * @covers Copycat\Callback\Handler::get() */ public function testGet() { $handler = new Handler(array('foo' => new Collection(array(function () { return 'bar'; })))); $this->assertInstanceOf('\\Copycat\\Callback\\Collection', $handler->get('foo')); }
<?php require_once 'inc/inc.redberry.php'; $request = new Request(); print Handler::get(PathManager::findHandler($request->getUri()))->go();