Beispiel #1
0
 /**
  * @test
  */
 public function constructor()
 {
     $resolver = $this->getMock('\\Dnsbl\\Resolver\\InterfaceResolver');
     $bl = new Server('sp.subrl.org', $resolver, array('domain'));
     $this->assertTrue($bl->supportDomain());
     $this->assertSame('sp.subrl.org', $bl->getHostname());
     $this->assertInstanceOf('\\Dnsbl\\Resolver\\InterfaceResolver', $bl->getResolver());
 }
Beispiel #2
0
 /**
  * Add the server to BlServers
  *
  * @param Server $server
  *
  * @exception Resolver\NotFoundResolverException
  *
  * @return Dnsbl
  */
 public function addBlServer(Server $server)
 {
     if (is_null($server->getResolver())) {
         throw new Resolver\NotFoundResolverException('Set the server resolver.');
     }
     $this->blServers[] = $server;
     return $this;
 }