public function getPageHandlers() { return $this->handlers; }
function testCanRegisterFunctionsAsPageHandlers() { $registered = $this->router->registerPageHandler('hello', array($this, 'hello_page_handler')); $this->assertTrue($registered); $path = "hello/1/€"; // euro sign $qs = http_build_query(array(Application::GET_PATH_KEY => $path)); $request = \Elgg\Http\Request::create("http://localhost/?{$qs}"); ob_start(); $handled = $this->router->route($request); $output = ob_get_clean(); $this->assertTrue($handled); $this->assertEquals($path, $output); $this->assertEquals(array('hello' => array($this, 'hello_page_handler')), $this->router->getPageHandlers()); }