/** * @dataProvider noSchemeProvider * @covers \Erebot\URI::asParsedURL */ public function testParseURLWithoutSchemes($url) { $this->setExpectedException('\\InvalidArgumentException'); $uri = new \Erebot\URI($url); $uri->asParsedURL(); }
/** * @dataProvider normalResults * @covers \Erebot\URI::relative */ public function testNormalResolution($reference, $targetURI) { $base = new \Erebot\URI("http://a/b/c/d;p?q"); $target = $base->relative($reference); $this->assertEquals($targetURI, (string) $target, $reference); }
/** * @dataProvider invalidPathProvider * @covers \Erebot\URI::setPath */ public function testSetPathWithInvalidPath($path) { $this->setExpectedException('\\InvalidArgumentException'); $uri = new \Erebot\URI("http://localhost"); $uri->setPath($path); }