From 22d31742c4f9cf0136323d13bf49952b66b93bf3 Mon Sep 17 00:00:00 2001 From: Rizda Dwi Prasetya Date: Mon, 20 Jul 2020 05:38:17 +0000 Subject: [PATCH] fix testRealConnect issue caused by unexpected API response if key empty --- tests/MidtransCoreApiTest.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/MidtransCoreApiTest.php b/tests/MidtransCoreApiTest.php index b3c94f9..7417ca9 100644 --- a/tests/MidtransCoreApiTest.php +++ b/tests/MidtransCoreApiTest.php @@ -41,8 +41,9 @@ public function testCharge() $this->assertTrue(in_array('X-Override-Notification: https://example.com', $fields["HTTPHEADER"])); } - public function testRealConnect() + public function testRealConnectWithInvalidKey() { + Config::$serverKey = 'invalid-server-key'; $params = array( 'transaction_details' => array( 'order_id' => rand(),