/** * @expectedException UnexpectedValueException * @expectedExceptionMessage The Response content must be a string or object implementing __toString(), "array" given. */ public function testExceptionWhenRouteReturnsCrap() { $route = new Route('/', function () { return []; // Invalid return value for a route }); $app = new Application(); $request = new Request(); $route->run($app, $request); }