mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-04 08:47:23 +08:00
fix tests
This commit is contained in:
parent
1eb9643ff3
commit
9a29bf07ca
2 changed files with 17 additions and 6 deletions
|
@ -49,7 +49,9 @@ class PaymentTokenEndpointTest extends TestCase
|
|||
$id = 1;
|
||||
$token = Mockery::mock(Token::class);
|
||||
$rawResponse = ['body' => '{"payment_tokens":[{"id": "123abc"}]}'];
|
||||
$paymentToken = new PaymentToken('foo', 'PAYMENT_METHOD_TOKEN');
|
||||
$paymentToken = Mockery::mock(PaymentToken::class);
|
||||
$paymentToken->shouldReceive('id')
|
||||
->andReturn('foo');
|
||||
|
||||
$this->bearer->shouldReceive('bearer')
|
||||
->andReturn($token);
|
||||
|
@ -131,7 +133,9 @@ class PaymentTokenEndpointTest extends TestCase
|
|||
|
||||
public function testDeleteToken()
|
||||
{
|
||||
$paymentToken = new PaymentToken('foo', 'PAYMENT_METHOD_TOKEN');
|
||||
$paymentToken = $paymentToken = Mockery::mock(PaymentToken::class);
|
||||
$paymentToken->shouldReceive('id')
|
||||
->andReturn('foo');
|
||||
$token = Mockery::mock(Token::class);
|
||||
$this->bearer->shouldReceive('bearer')
|
||||
->andReturn($token);
|
||||
|
@ -147,7 +151,9 @@ class PaymentTokenEndpointTest extends TestCase
|
|||
|
||||
public function testDeleteTokenFails()
|
||||
{
|
||||
$paymentToken = new PaymentToken('foo', 'PAYMENT_METHOD_TOKEN');
|
||||
$paymentToken = Mockery::mock(PaymentToken::class);
|
||||
$paymentToken->shouldReceive('id')
|
||||
->andReturn('foo');
|
||||
$token = Mockery::mock(Token::class);
|
||||
$this->bearer->shouldReceive('bearer')
|
||||
->andReturn($token);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue