| 676 |
lars |
1 |
<?php
|
|
|
2 |
|
|
|
3 |
namespace Srmklive\PayPal\Tests\Unit\Adapter;
|
|
|
4 |
|
|
|
5 |
use PHPUnit\Framework\TestCase;
|
|
|
6 |
use Srmklive\PayPal\Tests\MockClientClasses;
|
|
|
7 |
use Srmklive\PayPal\Tests\MockResponsePayloads;
|
|
|
8 |
|
|
|
9 |
class PaymentRefundsTest extends TestCase
|
|
|
10 |
{
|
|
|
11 |
use MockClientClasses;
|
|
|
12 |
use MockResponsePayloads;
|
|
|
13 |
|
|
|
14 |
/** @test */
|
|
|
15 |
public function it_can_show_details_for_a_refund()
|
|
|
16 |
{
|
|
|
17 |
$expectedResponse = $this->mockGetRefundDetailsResponse();
|
|
|
18 |
|
|
|
19 |
$expectedMethod = 'showRefundDetails';
|
|
|
20 |
|
|
|
21 |
$mockClient = $this->mock_client($expectedResponse, $expectedMethod, true);
|
|
|
22 |
|
|
|
23 |
$mockClient->setApiCredentials($this->getMockCredentials());
|
|
|
24 |
$mockClient->getAccessToken();
|
|
|
25 |
|
|
|
26 |
$this->assertEquals($expectedResponse, $mockClient->{$expectedMethod}('1JU08902781691411'));
|
|
|
27 |
}
|
|
|
28 |
}
|