Ejemplo n.º 1
0
 /**
  * @covers DNSMadeEasy\driver\Configuration::getDebug
  */
 public function testGetDebug()
 {
     $this->configuration->debug(true);
     $this->assertTrue($this->configuration->getDebug(), "Debug should be set to true");
     $this->configuration->debug(false);
     $this->assertFalse($this->configuration->getDebug(), "Debug should be set to false");
 }
Ejemplo n.º 2
0
 /**
  * Turns the debugger on and off.
  * @param boolean $value Whether to turn the debugger on or off.
  */
 public function debug($value)
 {
     $this->_config->debug($value);
 }
Ejemplo n.º 3
0
 /**
  * @covers DNSMadeEasy\driver\REST::send
  */
 public function testSendInDebugMode()
 {
     $reflectionClass = new \ReflectionClass('DNSMadeEasy\\driver\\REST');
     $send = $reflectionClass->getMethod('send');
     $send->setAccessible(true);
     $configuration = new Configuration($this->getApiKey(), $this->getSecretKey(), true);
     $configuration->debug(true);
     $rest = new REST($configuration);
     $this->setOutputCallback(function ($output) {
         $this->assertInternalType('string', $output);
     });
     $send->invoke($rest, '/dns/soa{?rows,page}', array('rows' => 1, 'page' => 1), 'GET');
 }