public function testAuthorizationWithConfig() { $config = new Braintree\Configuration(['environment' => 'development', 'merchant_id' => 'integration_merchant_id', 'publicKey' => 'badPublicKey', 'privateKey' => 'badPrivateKey']); $http = new Braintree\Http($config); $result = $http->_doUrlRequest('GET', $config->baseUrl() . '/merchants/integration_merchant_id/customers'); $this->assertEquals(401, $result['status']); }
public function testLoggingDuration() { $logger = new CurlAuditLogger(); $config = new Braintree\Configuration(['environment' => 'development', 'merchant_id' => 'integration_merchant_id', 'publicKey' => 'badPublicKey', 'privateKey' => 'badPrivateKey', 'logger' => $logger]); $http = new Braintree\Http($config); $http->_doUrlRequest('GET', $config->baseUrl() . '/merchants/integration_merchant_id/customers'); $this->assertLessThanOrEqual(1, $logger->getDuration()); }