/** * @expectedException InvalidArgumentException * @expectedExceptionMessage Unknown HTTP method: XXX */ public function testInvalidMethod() { $route = new Route(); $route->method('XXX'); }