File tree Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -111,6 +111,24 @@ public function testUrlDirectory()
111111 $ this ->assertNull ($ url ->getDirectory (3 ));
112112 }
113113
114+ public function testUrlDomain ()
115+ {
116+ $ url = new Embed \Url ('http://www.domain.com ' );
117+
118+ $ this ->assertEquals ('domain ' , $ url ->getDomain ());
119+ $ this ->assertEquals ('domain.com ' , $ url ->getDomain (1 ));
120+
121+ $ url = new Embed \Url ('http://www.domain.co.uk ' );
122+
123+ $ this ->assertEquals ('domain ' , $ url ->getDomain ());
124+ $ this ->assertEquals ('domain.co.uk ' , $ url ->getDomain (1 ));
125+
126+ $ url = new Embed \Url ('http://www.domain.com.au ' );
127+
128+ $ this ->assertEquals ('domain ' , $ url ->getDomain ());
129+ $ this ->assertEquals ('domain.com.au ' , $ url ->getDomain (1 ));
130+ }
131+
114132 public function testRedirections ()
115133 {
116134 $ this ->checkUrl (
You can’t perform that action at this time.
0 commit comments