Ejemplo n.º 1
0
 /**
  * Test Enom constructor
  *
  * @covers SOG\EnomBundle\Services\Enom::__construct
  */
 public function testEnomConstruct()
 {
     $enom = new Enom('https://reseller.enom.com', 'reseller_uid', 'reseller_pw');
     $this->assertEquals('https://reseller.enom.com', $enom->getUrl());
     $this->assertEquals('reseller_uid', $enom->getUsername());
     $this->assertEquals('reseller_pw', $enom->getPassword());
 }
Ejemplo n.º 2
0
 /**
  * Test getOrderList
  *
  * @covers SOG\EnomBundle\Services\Commands\Account::getOrderList
  *
  * @expectedException SOG\EnomBundle\Services\EnomException
  */
 public function testGetOrderList()
 {
     // Use live Enom test credentials
     $enom = new Enom('http://resellertest.enom.com', 'resellid', 'resellpw');
     // For some reason Enom's public API username and password do not work
     // with this command, and so an exception will be thrown.
     // We expect this and test for it here (see annotations)
     $data = $enom->getAccount()->getOrderList();
 }
Ejemplo n.º 3
0
 /**
  * Test extended attributes
  *
  * @covers SOG\EnomBundle\Services\Commands\Domain\Registration::getExtAttributes
  */
 public function testRegistrationExtAttributes()
 {
     // Use live Enom test credentials
     $enom = new Enom('http://resellertest.enom.com', 'resellerid', 'resellpw');
     $data = $enom->getDomainRegistration()->getExtAttributes("co.uk");
     // Ensure we have 4 attributes for .co.uk TLD
     $this->assertEquals(4, $data->children()->count());
 }