/** * @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"); }
/** * 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); }
/** * @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'); }