Skip to content

Commit

Permalink
Merge branch 'release/v1.3.1'
Browse files Browse the repository at this point in the history
  • Loading branch information
sunaoka committed Mar 29, 2024
2 parents dda6aef + 7e7c149 commit 1b60896
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 6 deletions.
6 changes: 6 additions & 0 deletions tests/AmazonPayServiceProviderTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,18 @@

class AmazonPayServiceProviderTest extends TestCase
{
/**
* @throws \Exception
*/
public function testFacade(): void
{
$actual = \AmazonPay::__get('sandbox');
self::assertTrue($actual);
}

/**
* @throws \Exception
*/
public function testGetAmazonPayScript(): void
{
$actual = \AmazonPay::getAmazonPayScript();
Expand Down
15 changes: 9 additions & 6 deletions tests/TestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

namespace Tests;

use Illuminate\Contracts\Config\Repository;
use Sunaoka\AmazonPay\Laravel\Facade\AmazonPay;
use Sunaoka\AmazonPay\Laravel\Provider\AmazonPayServiceProvider;

Expand Down Expand Up @@ -40,11 +41,13 @@ protected function getPackageAliases($app): array
*/
protected function defineEnvironment($app): void
{
$app['config']->set('amazon-pay', [
'public_key_id' => 'public_key_id',
'private_key' => 'private_key',
'sandbox' => true,
'region' => 'us',
]);
tap($app['config'], function (Repository $config) {
$config->set('amazon-pay', [
'public_key_id' => 'public_key_id',
'private_key' => 'private_key',
'sandbox' => true,
'region' => 'us',
]);
});
}
}

0 comments on commit 1b60896

Please sign in to comment.