/** * @expectedException Gajus\Director\Exception\InvalidArgumentException * @expectedExceptionMessage Cannot overwrite existing route. */ public function testOverwriteExistingRoute() { $locator = new \Gajus\Director\Locator('http://gajus.com/'); $locator->setRoute('foo', 'http://gajus.com/foo/'); $locator->setRoute('foo', 'http://gajus.com/foo/'); }