2
2
namespace MallardDuck \Whois \Test ;
3
3
4
4
use PHPUnit \Framework \TestCase ;
5
- use MallardDuck \Whois \WhoisServerList \Locator ;
5
+ use MallardDuck \Whois \WhoisServerList \DomainLocator ;
6
6
use MallardDuck \Whois \Exceptions \MissingArgException ;
7
7
use MallardDuck \Whois \Exceptions \UnknownWhoisException ;
8
8
@@ -24,7 +24,7 @@ public function testBlankStringThrowsException()
24
24
{
25
25
$ this ->expectException (MissingArgException::class);
26
26
27
- $ var = new Locator ;
27
+ $ var = new DomainLocator ;
28
28
$ results = $ var ->findWhoisServer ('' );
29
29
unset($ var , $ results );
30
30
}
@@ -34,7 +34,7 @@ public function testBlankStringThrowsException()
34
34
*/
35
35
public function testFindServerThenGetWhoisServerThenEmpty ()
36
36
{
37
- $ var = new Locator ;
37
+ $ var = new DomainLocator ;
38
38
$ results = $ var ->findWhoisServer ("com.com " )->getWhoisServer ();
39
39
$ this ->assertTrue (is_string ($ results ) && !empty ($ results ));
40
40
$ this ->assertTrue ("whois.verisign-grs.com " === $ results );
@@ -56,7 +56,7 @@ public function testNullStringThrowsException()
56
56
$ this ->expectException (\Exception::class);
57
57
}
58
58
59
- $ var = new Locator ;
59
+ $ var = new DomainLocator ;
60
60
$ results = $ var ->findWhoisServer (null );
61
61
unset($ var , $ results );
62
62
}
@@ -66,7 +66,7 @@ public function testNullStringThrowsException()
66
66
*/
67
67
public function testFindServerThenGetWhoisServerThenNull ()
68
68
{
69
- $ var = new Locator ;
69
+ $ var = new DomainLocator ;
70
70
$ results = $ var ->findWhoisServer ("com.com " )->getWhoisServer ();
71
71
$ this ->assertTrue (is_string ($ results ) && !empty ($ results ));
72
72
$ this ->assertTrue ("whois.verisign-grs.com " === $ results );
@@ -86,15 +86,15 @@ public function testFindServerThenGetWhoisServerThenNull()
86
86
*/
87
87
public function testGetWhoisServerDirect ()
88
88
{
89
- $ var = new Locator ;
89
+ $ var = new DomainLocator ;
90
90
$ results = $ var ->getWhoisServer ("bing.com " );
91
91
$ this ->assertTrue (is_string ($ results ) && !empty ($ results ));
92
92
$ this ->assertTrue ("whois.verisign-grs.com " === $ results );
93
93
unset($ var , $ results );
94
94
95
95
$ this ->expectException (MissingArgException::class);
96
96
97
- $ var = new Locator ;
97
+ $ var = new DomainLocator ;
98
98
$ results = $ var ->getWhoisServer ();
99
99
unset($ var , $ results );
100
100
}
@@ -104,7 +104,7 @@ public function testGetWhoisServerDirect()
104
104
*/
105
105
public function testGetWhoisServerDirectNoException ()
106
106
{
107
- $ var = new Locator ;
107
+ $ var = new DomainLocator ;
108
108
$ results = $ var ->getWhoisServer ("bing.com " );
109
109
$ orgResults = $ results ;
110
110
$ this ->assertTrue (is_string ($ results ) && !empty ($ results ));
@@ -121,7 +121,7 @@ public function testGetWhoisServerDirectNoException()
121
121
*/
122
122
public function testGetWhoisServerDirectUnicodeException ()
123
123
{
124
- $ var = new Locator ;
124
+ $ var = new DomainLocator ;
125
125
$ this ->expectException (UnknownWhoisException::class);
126
126
127
127
$ results = $ var ->getWhoisServer ('xn--e1afmkfd.xn--80akhbyknj4f ' );
0 commit comments