Ejemplo n.º 1
0
Archivo: UrlTest.php Proyecto: 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());
 }