예제 #1
0
파일: UrlTest.php 프로젝트: weew/url
 public function test_to_array()
 {
     $url = new Url($this->url);
     $this->assertEquals(['protocol' => $url->getProtocol(), 'tld' => $url->getTLD(), 'domain' => $url->getDomain(), 'subdomain' => $url->getSubdomain(), 'host' => $url->getHost(), 'port' => $url->getPort(), 'path' => $url->getPath(), 'query' => $url->getQuery()->toArray(), 'username' => $url->getUsername(), 'password' => $url->getPassword(), 'fragment' => $url->getFragment(), 'full' => 'http://*****:*****@just.an.example.com:80/products?sku=1234#price'], $url->toArray());
 }