Skip to content

Commit

Permalink
Fix tests for #658
Browse files Browse the repository at this point in the history
  • Loading branch information
overtrue committed Apr 21, 2017
1 parent 0c66f95 commit 7ad8b97
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions tests/Payment/PaymentAPITest.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,10 @@ public function getAPI()
'notify_url' => 'merchant_default_notify_url',
]);

$api = \Mockery::mock('EasyWeChat\Payment\API[getHttp]', [$merchant])->shouldAllowMockingProtectedMethods();
$api = \Mockery::mock('EasyWeChat\Payment\API[getHttp]', [$merchant])
->shouldAllowMockingProtectedMethods();

$api->shouldReceive('wrapApi')->passthru();
$api->shouldReceive('getHttp')->andReturn($http);

return $api;
Expand Down Expand Up @@ -204,7 +207,9 @@ public function testDownloadBill()
'notify_url' => 'merchant_default_notify_url',
]);

$api = \Mockery::mock('EasyWeChat\Payment\API[getHttp]', [$merchant]);
$api = \Mockery::mock('EasyWeChat\Payment\API[getHttp]', [$merchant])->shouldAllowMockingProtectedMethods();

$api->shouldReceive('wrapApi')->passthru();
$api->shouldReceive('getHttp')->andReturn($http);

$response = $api->downloadBill('20150901');
Expand Down

0 comments on commit 7ad8b97

Please sign in to comment.