/** * Test the respond function * * @return void * @author Dan Cox */ public function test_respond() { $app = new Application(); $app->loadEnv('test'); // Add a route $DI = $app->getDI(); $DI->get('route')->add('test.route', '/', array('GET'), array('_controller' => 'Wasp\\Test\\Controller\\Controller::returnObject')); $DI->get('request')->make('/', 'GET', []); ob_start(); $app->respond(); $response = ob_get_contents(); ob_end_clean(); $this->assertEquals('Foo', $response); }