Example #1
0
 /**
  * @dataProvider    noSchemeProvider
  * @covers          \Erebot\URI::asParsedURL
  */
 public function testParseURLWithoutSchemes($url)
 {
     $this->setExpectedException('\\InvalidArgumentException');
     $uri = new \Erebot\URI($url);
     $uri->asParsedURL();
 }
Example #2
0
 /**
  * @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);
 }
Example #3
0
 /**
  * @dataProvider    invalidPathProvider
  * @covers          \Erebot\URI::setPath
  */
 public function testSetPathWithInvalidPath($path)
 {
     $this->setExpectedException('\\InvalidArgumentException');
     $uri = new \Erebot\URI("http://localhost");
     $uri->setPath($path);
 }