Skip to content

Commit

Permalink
Fix mpesaExpress tests
Browse files Browse the repository at this point in the history
  • Loading branch information
gathuku committed May 10, 2020
1 parent 5cb4adc commit 98f3302
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .phpunit.result.cache
Original file line number Diff line number Diff line change
@@ -1 +1 @@
C:37:"PHPUnit\Runner\DefaultTestResultCache":997:{a:2:{s:7:"defects";a:5:{s:42:"Gathuku\Mpesa\Tests\BaseTest::true_is_true";i:4;s:55:"Gathuku\Mpesa\Tests\Unit\InstallMpesaTest::true_is_true";i:4;s:57:"Gathuku\Mpesa\Tests\Unit\MpesaAuthTokenTest::true_is_true";i:4;s:47:"Gathuku\Mpesa\Tests\Unit\MpesaB2CTest::test_b2c";i:3;s:61:"Gathuku\Mpesa\Tests\Unit\MpesaExpressTest::test_mpesa_express";i:3;}s:5:"times";a:9:{s:42:"Gathuku\Mpesa\Tests\BaseTest::true_is_true";d:0.24;s:55:"Gathuku\Mpesa\Tests\Unit\InstallMpesaTest::true_is_true";d:0.155;s:57:"Gathuku\Mpesa\Tests\Unit\MpesaAuthTokenTest::true_is_true";d:0.152;s:60:"Gathuku\Mpesa\Tests\Unit\MpesaRegisterUrlsTest::true_is_true";d:0.158;s:47:"Gathuku\Mpesa\Tests\Unit\MpesaB2CTest::test_b2c";d:1.624;s:51:"Gathuku\Mpesa\Tests\Unit\MpesaB2CTest::true_is_true";d:0.154;s:61:"Gathuku\Mpesa\Tests\Unit\MpesaExpressTest::test_mpesa_express";d:2.305;s:55:"Gathuku\Mpesa\Tests\Unit\MpesaExpressTest::true_is_true";d:0.159;s:60:"Gathuku\Mpesa\Tests\Unit\MpesaSimeulateC2BTest::true_is_true";d:0.154;}}}
C:37:"PHPUnit\Runner\DefaultTestResultCache":997:{a:2:{s:7:"defects";a:5:{s:42:"Gathuku\Mpesa\Tests\BaseTest::true_is_true";i:4;s:55:"Gathuku\Mpesa\Tests\Unit\InstallMpesaTest::true_is_true";i:4;s:57:"Gathuku\Mpesa\Tests\Unit\MpesaAuthTokenTest::true_is_true";i:4;s:47:"Gathuku\Mpesa\Tests\Unit\MpesaB2CTest::test_b2c";i:3;s:61:"Gathuku\Mpesa\Tests\Unit\MpesaExpressTest::test_mpesa_express";i:3;}s:5:"times";a:9:{s:42:"Gathuku\Mpesa\Tests\BaseTest::true_is_true";d:1.556;s:55:"Gathuku\Mpesa\Tests\Unit\InstallMpesaTest::true_is_true";d:0.14;s:57:"Gathuku\Mpesa\Tests\Unit\MpesaAuthTokenTest::true_is_true";d:0.14;s:60:"Gathuku\Mpesa\Tests\Unit\MpesaRegisterUrlsTest::true_is_true";d:0.152;s:47:"Gathuku\Mpesa\Tests\Unit\MpesaB2CTest::test_b2c";d:3.461;s:51:"Gathuku\Mpesa\Tests\Unit\MpesaB2CTest::true_is_true";d:0.146;s:61:"Gathuku\Mpesa\Tests\Unit\MpesaExpressTest::test_mpesa_express";d:12.852;s:55:"Gathuku\Mpesa\Tests\Unit\MpesaExpressTest::true_is_true";d:0.148;s:60:"Gathuku\Mpesa\Tests\Unit\MpesaSimeulateC2BTest::true_is_true";d:0.142;}}}
2 changes: 1 addition & 1 deletion tests/Unit/MpesaExpressTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ public function test_mpesa_express()
$response = Mpesa::express(100,'254705112855','24242524','Testing Payment');
$data = json_decode($response,true);

if(isset($result['CheckoutRequestID')){
if(isset($data['CheckoutRequestID'])){
$this->assertArrayHasKey('MerchantRequestID',$data,"response don't have MerchantRequestID");
$this->assertArrayHasKey('CheckoutRequestID',$data, "response don't have CheckoutRequestID");
$this->assertArrayHasKey('ResponseDescription',$data, "response don't have ResponseDescription");
Expand Down

0 comments on commit 98f3302

Please sign in to comment.