예제 #1
0
 public function testHttpsProtocolToString()
 {
     $urlParser = new UrlParser('https://*****:*****@mydomain.com:8080/path?name=heudon&last_name=reinaldo#top');
     $parsedUrl = $urlParser->parse();
     $this->assertInstanceOf('Kbca\\UrlParser\\ValueObject\\Protocol', $parsedUrl->getProtocol());
     $this->assertEquals('https', $parsedUrl->getProtocol()->getValue());
     $this->assertEquals('https://', $parsedUrl->getProtocol()->__toString());
 }
예제 #2
0
 public function testParsedUrlWithDuplicateDot()
 {
     $urlParser = new UrlParser('http://*****:*****@mydomain...com..br:8080/path?name=heudon&last_name=reinaldo#top');
     $parsedUrl = $urlParser->parse();
     $this->assertEquals('http://*****:*****@mydomain.com.br:8080/path?name=heudon&last_name=reinaldo#top', $parsedUrl);
 }
예제 #3
0
파일: HostTest.php 프로젝트: kbca/UrlParser
 /**
  * @dataProvider urlsProvider
  */
 public function testToString($url)
 {
     $urlParser = new UrlParser($url);
     $parsedUrl = $urlParser->parse();
     $this->assertEquals('mydomain.com:8080', $parsedUrl->getHost()->__toString());
 }
예제 #4
0
파일: UrlTest.php 프로젝트: kbca/UrlParser
 /**
  * @dataProvider urlsProvider
  */
 public function testToString($url)
 {
     $urlParser = new UrlParser($url);
     $parsedUrl = $urlParser->parse();
     $this->assertEquals($url, $parsedUrl->__toString());
 }
예제 #5
0
 /**
  * @dataProvider urlsProvider
  */
 public function testToString($url)
 {
     $urlParser = new UrlParser($url);
     $parsedUrl = $urlParser->parse();
     $this->assertEquals('/path?name=heudon&last_name=reinaldo#top', $parsedUrl->getParam()->__toString());
 }
예제 #6
0
파일: UserTest.php 프로젝트: kbca/UrlParser
 /**
  * @dataProvider urlsProviderWithUser
  */
 public function testToString($url)
 {
     $urlParser = new UrlParser($url);
     $parsedUrl = $urlParser->parse();
     $this->assertEquals('heudon:123321@', $parsedUrl->getUser()->__toString());
 }