-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #260 from blockchyp/feature/javaBug
Java test bug and php null exception fix
- Loading branch information
1 parent
c0c6d5b
commit d79ef43
Showing
2 changed files
with
55 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
<?php | ||
|
||
use BlockChyp\BlockChyp; | ||
|
||
require_once(__DIR__ . '/../BlockChypTestCase.php'); | ||
|
||
class MerchantCredentialGenerationTest extends BlockChypTestCase | ||
{ | ||
|
||
/** | ||
* @group itest | ||
*/ | ||
public function testMerchantCredentialGeneration() | ||
{ | ||
$config = $this->loadTestConfiguration(); | ||
|
||
BlockChyp::setApiKey($config->apiKey); | ||
BlockChyp::setBearerToken($config->bearerToken); | ||
BlockChyp::setSigningKey($config->signingKey); | ||
BlockChyp::setGatewayHost($config->gatewayHost); | ||
BlockChyp::setTestGatewayHost($config->testGatewayHost); | ||
BlockChyp::setDashboardHost($config->dashboardHost); | ||
|
||
echo 'Running MerchantCredentialGenerationTest...' . PHP_EOL; // Set request values | ||
$request = [ | ||
'test' => true, | ||
'merchantId' => '<MERCHANT ID>', | ||
]; | ||
|
||
// self::logRequest($request); | ||
|
||
try { | ||
|
||
$response = BlockChyp::merchantCredentialGeneration($request); | ||
|
||
// self::logResponse($response); | ||
|
||
// Response assertions | ||
|
||
$this->assertTrue($response['success']); | ||
|
||
} catch (Exception $ex) { | ||
|
||
echo $ex->getTraceAsString(); | ||
$this->assertEmpty($ex); | ||
|
||
} | ||
$this->processResponseDelay($request); | ||
} | ||
} |