From 836c7cd0240925c2ce8a5b5139209318e252058f Mon Sep 17 00:00:00 2001 From: Raza Mehdi Date: Mon, 24 Jun 2024 21:31:01 +0500 Subject: [PATCH] Use orchestral/testbench for tests. --- .gitignore | 2 ++ composer.json | 1 + phpunit.xml.dist | 1 - testbench.yaml | 16 +++++++++++++ tests/Commands/PublishAssetsCommandTest.php | 23 +++++++++++++++++++ .../AdapterBillingPlansPricingHelpersTest.php | 2 +- tests/Feature/AdapterConfigTest.php | 2 +- .../AdapterCreateSubscriptionHelpersTest.php | 2 +- .../Feature/AdapterExperienceContextTest.php | 2 +- tests/Feature/AdapterFeatureTest.php | 2 +- tests/Feature/AdapterOrdersHelperTest.php | 2 +- .../AdapterPaymentMethodTokensHelpersTest.php | 2 +- tests/Unit/Adapter/BillingPlansTest.php | 2 +- tests/Unit/Adapter/CatalogProductsTest.php | 2 +- tests/Unit/Adapter/DisputeActionsTest.php | 2 +- tests/Unit/Adapter/DisputesTest.php | 2 +- tests/Unit/Adapter/IdentityTest.php | 2 +- tests/Unit/Adapter/InvoicesSearchTest.php | 2 +- tests/Unit/Adapter/InvoicesTemplatesTest.php | 2 +- tests/Unit/Adapter/InvoicesTest.php | 2 +- tests/Unit/Adapter/OrdersTest.php | 2 +- tests/Unit/Adapter/PartnerReferralsTest.php | 2 +- .../Adapter/PaymentAuthorizationsTest.php | 2 +- tests/Unit/Adapter/PaymentCapturesTest.php | 2 +- .../PaymentExperienceWebProfilesTest.php | 2 +- tests/Unit/Adapter/PaymentRefundsTest.php | 2 +- tests/Unit/Adapter/PayoutsTest.php | 2 +- tests/Unit/Adapter/ReferencedPayoutsTest.php | 2 +- tests/Unit/Adapter/ReportingTest.php | 2 +- tests/Unit/Adapter/SubscriptionsTest.php | 2 +- tests/Unit/Adapter/TrackersTest.php | 2 +- tests/Unit/Adapter/WebHooksEventsTest.php | 2 +- tests/Unit/Adapter/WebHooksTest.php | 2 +- .../Unit/Adapter/WebHooksVerificationTest.php | 2 +- tests/Unit/AdapterTest.php | 2 +- tests/Unit/Client/BillingPlansTest.php | 2 +- tests/Unit/Client/CatalogProductsTest.php | 2 +- tests/Unit/Client/DisputeActionsTest.php | 2 +- tests/Unit/Client/DisputesTest.php | 2 +- tests/Unit/Client/IdentityTest.php | 2 +- tests/Unit/Client/InvoicesSearchTest.php | 2 +- tests/Unit/Client/InvoicesTemplatesTest.php | 2 +- tests/Unit/Client/InvoicesTest.php | 2 +- tests/Unit/Client/OrdersTest.php | 2 +- tests/Unit/Client/PartnerReferralsTest.php | 2 +- .../Unit/Client/PaymentAuthorizationsTest.php | 2 +- tests/Unit/Client/PaymentCapturesTest.php | 2 +- .../PaymentExperienceWebProfilesTest.php | 2 +- tests/Unit/Client/PaymentRefundsTest.php | 2 +- tests/Unit/Client/PayoutsTest.php | 2 +- tests/Unit/Client/ReferencedPayoutsTest.php | 2 +- tests/Unit/Client/ReportingTest.php | 2 +- tests/Unit/Client/SubscriptionsTest.php | 2 +- tests/Unit/Client/TrackersTest.php | 2 +- tests/Unit/Client/WebHooksEventsTest.php | 2 +- tests/Unit/Client/WebHooksTest.php | 2 +- .../Unit/Client/WebHooksVerificationTest.php | 2 +- tests/Unit/ClientTest.php | 2 +- 58 files changed, 95 insertions(+), 54 deletions(-) create mode 100644 testbench.yaml create mode 100644 tests/Commands/PublishAssetsCommandTest.php diff --git a/.gitignore b/.gitignore index c996eed7..b4d64f1a 100644 --- a/.gitignore +++ b/.gitignore @@ -8,3 +8,5 @@ composer.lock test.php /.venv /docs/build +/node_modules +package*.json diff --git a/composer.json b/composer.json index 19197188..1752b583 100644 --- a/composer.json +++ b/composer.json @@ -36,6 +36,7 @@ "nesbot/carbon": "~2.0|^3.0" }, "require-dev": { + "orchestra/testbench": "^9.1", "pestphp/pest": "~2.0", "phpstan/phpstan": "^1.10", "symfony/var-dumper": "~5.0|^6.0|^7.0" diff --git a/phpunit.xml.dist b/phpunit.xml.dist index 5bff6011..139dd0a3 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -23,7 +23,6 @@ src/PayPalFacadeAccessor.php src/Traits/PayPalVerifyIPN.php src/Services/Str.php - src/Commands/ src/Facades/ src/Providers/ diff --git a/testbench.yaml b/testbench.yaml new file mode 100644 index 00000000..8470e289 --- /dev/null +++ b/testbench.yaml @@ -0,0 +1,16 @@ +providers: + - Srmklive\PayPal\Providers\PayPalServiceProvider + +workbench: + start: '/' + install: true + health: false + discovers: + web: false + api: false + commands: true + components: false + views: false + build: [] + assets: [] + sync: [] diff --git a/tests/Commands/PublishAssetsCommandTest.php b/tests/Commands/PublishAssetsCommandTest.php new file mode 100644 index 00000000..88abd971 --- /dev/null +++ b/tests/Commands/PublishAssetsCommandTest.php @@ -0,0 +1,23 @@ +assertStringContainsString('Installing the PayPal JS SDK through npm', $output); + $this->assertStringContainsString('Installed the PayPal JS SDK.', $output); + } +} diff --git a/tests/Feature/AdapterBillingPlansPricingHelpersTest.php b/tests/Feature/AdapterBillingPlansPricingHelpersTest.php index 024b1a0a..7c19b4b7 100644 --- a/tests/Feature/AdapterBillingPlansPricingHelpersTest.php +++ b/tests/Feature/AdapterBillingPlansPricingHelpersTest.php @@ -2,8 +2,8 @@ namespace Srmklive\PayPal\Tests\Feature; +use Orchestra\Testbench\TestCase; use PHPUnit\Framework\Attributes\Test; -use PHPUnit\Framework\TestCase; use Srmklive\PayPal\Services\PayPal as PayPalClient; use Srmklive\PayPal\Tests\MockClientClasses; use Srmklive\PayPal\Tests\MockResponsePayloads; diff --git a/tests/Feature/AdapterConfigTest.php b/tests/Feature/AdapterConfigTest.php index 6ee7d3e5..6d769c0e 100644 --- a/tests/Feature/AdapterConfigTest.php +++ b/tests/Feature/AdapterConfigTest.php @@ -2,8 +2,8 @@ namespace Srmklive\PayPal\Tests\Feature; +use Orchestra\Testbench\TestCase; use PHPUnit\Framework\Attributes\Test; -use PHPUnit\Framework\TestCase; use Srmklive\PayPal\Services\PayPal as PayPalClient; use Srmklive\PayPal\Tests\MockClientClasses; diff --git a/tests/Feature/AdapterCreateSubscriptionHelpersTest.php b/tests/Feature/AdapterCreateSubscriptionHelpersTest.php index 47934d16..e2ef1804 100644 --- a/tests/Feature/AdapterCreateSubscriptionHelpersTest.php +++ b/tests/Feature/AdapterCreateSubscriptionHelpersTest.php @@ -3,8 +3,8 @@ namespace Srmklive\PayPal\Tests\Feature; use Carbon\Carbon; +use Orchestra\Testbench\TestCase; use PHPUnit\Framework\Attributes\Test; -use PHPUnit\Framework\TestCase; use Srmklive\PayPal\Services\PayPal as PayPalClient; use Srmklive\PayPal\Tests\MockClientClasses; use Srmklive\PayPal\Tests\MockResponsePayloads; diff --git a/tests/Feature/AdapterExperienceContextTest.php b/tests/Feature/AdapterExperienceContextTest.php index 9615cbf0..4a92a905 100644 --- a/tests/Feature/AdapterExperienceContextTest.php +++ b/tests/Feature/AdapterExperienceContextTest.php @@ -5,8 +5,8 @@ namespace Srmklive\PayPal\Tests\Feature; use Carbon\Carbon; +use Orchestra\Testbench\TestCase; use PHPUnit\Framework\Attributes\Test; -use PHPUnit\Framework\TestCase; use Srmklive\PayPal\Services\PayPal as PayPalClient; use Srmklive\PayPal\Tests\MockClientClasses; use Srmklive\PayPal\Tests\MockRequestPayloads; diff --git a/tests/Feature/AdapterFeatureTest.php b/tests/Feature/AdapterFeatureTest.php index e4b04600..af2f5a8b 100644 --- a/tests/Feature/AdapterFeatureTest.php +++ b/tests/Feature/AdapterFeatureTest.php @@ -3,8 +3,8 @@ namespace Srmklive\PayPal\Tests\Feature; use Carbon\Carbon; +use Orchestra\Testbench\TestCase; use PHPUnit\Framework\Attributes\Test; -use PHPUnit\Framework\TestCase; use Srmklive\PayPal\Services\PayPal as PayPalClient; use Srmklive\PayPal\Tests\MockClientClasses; use Srmklive\PayPal\Tests\MockRequestPayloads; diff --git a/tests/Feature/AdapterOrdersHelperTest.php b/tests/Feature/AdapterOrdersHelperTest.php index 1cbc0c53..bc28a3f6 100644 --- a/tests/Feature/AdapterOrdersHelperTest.php +++ b/tests/Feature/AdapterOrdersHelperTest.php @@ -3,8 +3,8 @@ namespace Srmklive\PayPal\Tests\Feature; use Carbon\Carbon; +use Orchestra\Testbench\TestCase; use PHPUnit\Framework\Attributes\Test; -use PHPUnit\Framework\TestCase; use Srmklive\PayPal\Services\PayPal as PayPalClient; use Srmklive\PayPal\Tests\MockClientClasses; use Srmklive\PayPal\Tests\MockRequestPayloads; diff --git a/tests/Feature/AdapterPaymentMethodTokensHelpersTest.php b/tests/Feature/AdapterPaymentMethodTokensHelpersTest.php index f981abc4..c75448b9 100644 --- a/tests/Feature/AdapterPaymentMethodTokensHelpersTest.php +++ b/tests/Feature/AdapterPaymentMethodTokensHelpersTest.php @@ -2,8 +2,8 @@ namespace Srmklive\PayPal\Tests\Feature; +use Orchestra\Testbench\TestCase; use PHPUnit\Framework\Attributes\Test; -use PHPUnit\Framework\TestCase; use Srmklive\PayPal\Services\PayPal as PayPalClient; use Srmklive\PayPal\Tests\MockClientClasses; use Srmklive\PayPal\Tests\MockRequestPayloads; diff --git a/tests/Unit/Adapter/BillingPlansTest.php b/tests/Unit/Adapter/BillingPlansTest.php index 75740558..ca21724b 100644 --- a/tests/Unit/Adapter/BillingPlansTest.php +++ b/tests/Unit/Adapter/BillingPlansTest.php @@ -2,8 +2,8 @@ namespace Srmklive\PayPal\Tests\Unit\Adapter; +use Orchestra\Testbench\TestCase; use PHPUnit\Framework\Attributes\Test; -use PHPUnit\Framework\TestCase; use Srmklive\PayPal\Tests\MockClientClasses; use Srmklive\PayPal\Tests\MockRequestPayloads; use Srmklive\PayPal\Tests\MockResponsePayloads; diff --git a/tests/Unit/Adapter/CatalogProductsTest.php b/tests/Unit/Adapter/CatalogProductsTest.php index 20797583..c2fde15d 100644 --- a/tests/Unit/Adapter/CatalogProductsTest.php +++ b/tests/Unit/Adapter/CatalogProductsTest.php @@ -2,8 +2,8 @@ namespace Srmklive\PayPal\Tests\Unit\Adapter; +use Orchestra\Testbench\TestCase; use PHPUnit\Framework\Attributes\Test; -use PHPUnit\Framework\TestCase; use Srmklive\PayPal\Tests\MockClientClasses; use Srmklive\PayPal\Tests\MockRequestPayloads; use Srmklive\PayPal\Tests\MockResponsePayloads; diff --git a/tests/Unit/Adapter/DisputeActionsTest.php b/tests/Unit/Adapter/DisputeActionsTest.php index ec962968..100321b4 100644 --- a/tests/Unit/Adapter/DisputeActionsTest.php +++ b/tests/Unit/Adapter/DisputeActionsTest.php @@ -2,8 +2,8 @@ namespace Srmklive\PayPal\Tests\Unit\Adapter; +use Orchestra\Testbench\TestCase; use PHPUnit\Framework\Attributes\Test; -use PHPUnit\Framework\TestCase; use Srmklive\PayPal\Tests\MockClientClasses; use Srmklive\PayPal\Tests\MockResponsePayloads; diff --git a/tests/Unit/Adapter/DisputesTest.php b/tests/Unit/Adapter/DisputesTest.php index 76771c39..64335356 100644 --- a/tests/Unit/Adapter/DisputesTest.php +++ b/tests/Unit/Adapter/DisputesTest.php @@ -2,8 +2,8 @@ namespace Srmklive\PayPal\Tests\Unit\Adapter; +use Orchestra\Testbench\TestCase; use PHPUnit\Framework\Attributes\Test; -use PHPUnit\Framework\TestCase; use Srmklive\PayPal\Tests\MockClientClasses; use Srmklive\PayPal\Tests\MockRequestPayloads; use Srmklive\PayPal\Tests\MockResponsePayloads; diff --git a/tests/Unit/Adapter/IdentityTest.php b/tests/Unit/Adapter/IdentityTest.php index 0314729b..8f8e4018 100644 --- a/tests/Unit/Adapter/IdentityTest.php +++ b/tests/Unit/Adapter/IdentityTest.php @@ -2,8 +2,8 @@ namespace Srmklive\PayPal\Tests\Unit\Adapter; +use Orchestra\Testbench\TestCase; use PHPUnit\Framework\Attributes\Test; -use PHPUnit\Framework\TestCase; use Srmklive\PayPal\Tests\MockClientClasses; use Srmklive\PayPal\Tests\MockRequestPayloads; use Srmklive\PayPal\Tests\MockResponsePayloads; diff --git a/tests/Unit/Adapter/InvoicesSearchTest.php b/tests/Unit/Adapter/InvoicesSearchTest.php index c93efcdd..0e9b20e8 100644 --- a/tests/Unit/Adapter/InvoicesSearchTest.php +++ b/tests/Unit/Adapter/InvoicesSearchTest.php @@ -2,8 +2,8 @@ namespace Srmklive\PayPal\Tests\Unit\Adapter; +use Orchestra\Testbench\TestCase; use PHPUnit\Framework\Attributes\Test; -use PHPUnit\Framework\TestCase; use Srmklive\PayPal\Tests\MockClientClasses; use Srmklive\PayPal\Tests\MockRequestPayloads; use Srmklive\PayPal\Tests\MockResponsePayloads; diff --git a/tests/Unit/Adapter/InvoicesTemplatesTest.php b/tests/Unit/Adapter/InvoicesTemplatesTest.php index feaf2f16..c8b79c61 100644 --- a/tests/Unit/Adapter/InvoicesTemplatesTest.php +++ b/tests/Unit/Adapter/InvoicesTemplatesTest.php @@ -2,8 +2,8 @@ namespace Srmklive\PayPal\Tests\Unit\Adapter; +use Orchestra\Testbench\TestCase; use PHPUnit\Framework\Attributes\Test; -use PHPUnit\Framework\TestCase; use Srmklive\PayPal\Tests\MockClientClasses; use Srmklive\PayPal\Tests\MockRequestPayloads; use Srmklive\PayPal\Tests\MockResponsePayloads; diff --git a/tests/Unit/Adapter/InvoicesTest.php b/tests/Unit/Adapter/InvoicesTest.php index e2be7b45..0cf1b930 100644 --- a/tests/Unit/Adapter/InvoicesTest.php +++ b/tests/Unit/Adapter/InvoicesTest.php @@ -2,8 +2,8 @@ namespace Srmklive\PayPal\Tests\Unit\Adapter; +use Orchestra\Testbench\TestCase; use PHPUnit\Framework\Attributes\Test; -use PHPUnit\Framework\TestCase; use Srmklive\PayPal\Tests\MockClientClasses; use Srmklive\PayPal\Tests\MockRequestPayloads; use Srmklive\PayPal\Tests\MockResponsePayloads; diff --git a/tests/Unit/Adapter/OrdersTest.php b/tests/Unit/Adapter/OrdersTest.php index e1377e0a..149733c2 100644 --- a/tests/Unit/Adapter/OrdersTest.php +++ b/tests/Unit/Adapter/OrdersTest.php @@ -2,8 +2,8 @@ namespace Srmklive\PayPal\Tests\Unit\Adapter; +use Orchestra\Testbench\TestCase; use PHPUnit\Framework\Attributes\Test; -use PHPUnit\Framework\TestCase; use Srmklive\PayPal\Tests\MockClientClasses; use Srmklive\PayPal\Tests\MockRequestPayloads; use Srmklive\PayPal\Tests\MockResponsePayloads; diff --git a/tests/Unit/Adapter/PartnerReferralsTest.php b/tests/Unit/Adapter/PartnerReferralsTest.php index 0ae469fc..d52af4a5 100644 --- a/tests/Unit/Adapter/PartnerReferralsTest.php +++ b/tests/Unit/Adapter/PartnerReferralsTest.php @@ -2,8 +2,8 @@ namespace Srmklive\PayPal\Tests\Unit\Adapter; +use Orchestra\Testbench\TestCase; use PHPUnit\Framework\Attributes\Test; -use PHPUnit\Framework\TestCase; use Srmklive\PayPal\Tests\MockClientClasses; use Srmklive\PayPal\Tests\MockRequestPayloads; use Srmklive\PayPal\Tests\MockResponsePayloads; diff --git a/tests/Unit/Adapter/PaymentAuthorizationsTest.php b/tests/Unit/Adapter/PaymentAuthorizationsTest.php index 181b4f52..4584768c 100644 --- a/tests/Unit/Adapter/PaymentAuthorizationsTest.php +++ b/tests/Unit/Adapter/PaymentAuthorizationsTest.php @@ -2,8 +2,8 @@ namespace Srmklive\PayPal\Tests\Unit\Adapter; +use Orchestra\Testbench\TestCase; use PHPUnit\Framework\Attributes\Test; -use PHPUnit\Framework\TestCase; use Srmklive\PayPal\Tests\MockClientClasses; use Srmklive\PayPal\Tests\MockResponsePayloads; diff --git a/tests/Unit/Adapter/PaymentCapturesTest.php b/tests/Unit/Adapter/PaymentCapturesTest.php index 550c005b..e3ad3fd0 100644 --- a/tests/Unit/Adapter/PaymentCapturesTest.php +++ b/tests/Unit/Adapter/PaymentCapturesTest.php @@ -2,8 +2,8 @@ namespace Srmklive\PayPal\Tests\Unit\Adapter; +use Orchestra\Testbench\TestCase; use PHPUnit\Framework\Attributes\Test; -use PHPUnit\Framework\TestCase; use Srmklive\PayPal\Tests\MockClientClasses; use Srmklive\PayPal\Tests\MockResponsePayloads; diff --git a/tests/Unit/Adapter/PaymentExperienceWebProfilesTest.php b/tests/Unit/Adapter/PaymentExperienceWebProfilesTest.php index 3963ced2..699e7415 100644 --- a/tests/Unit/Adapter/PaymentExperienceWebProfilesTest.php +++ b/tests/Unit/Adapter/PaymentExperienceWebProfilesTest.php @@ -2,8 +2,8 @@ namespace Srmklive\PayPal\Tests\Unit\Adapter; +use Orchestra\Testbench\TestCase; use PHPUnit\Framework\Attributes\Test; -use PHPUnit\Framework\TestCase; use Srmklive\PayPal\Tests\MockClientClasses; use Srmklive\PayPal\Tests\MockRequestPayloads; use Srmklive\PayPal\Tests\MockResponsePayloads; diff --git a/tests/Unit/Adapter/PaymentRefundsTest.php b/tests/Unit/Adapter/PaymentRefundsTest.php index faa4b9c6..b122f112 100644 --- a/tests/Unit/Adapter/PaymentRefundsTest.php +++ b/tests/Unit/Adapter/PaymentRefundsTest.php @@ -2,8 +2,8 @@ namespace Srmklive\PayPal\Tests\Unit\Adapter; +use Orchestra\Testbench\TestCase; use PHPUnit\Framework\Attributes\Test; -use PHPUnit\Framework\TestCase; use Srmklive\PayPal\Tests\MockClientClasses; use Srmklive\PayPal\Tests\MockResponsePayloads; diff --git a/tests/Unit/Adapter/PayoutsTest.php b/tests/Unit/Adapter/PayoutsTest.php index 152e72d7..f0a90296 100644 --- a/tests/Unit/Adapter/PayoutsTest.php +++ b/tests/Unit/Adapter/PayoutsTest.php @@ -2,8 +2,8 @@ namespace Srmklive\PayPal\Tests\Unit\Adapter; +use Orchestra\Testbench\TestCase; use PHPUnit\Framework\Attributes\Test; -use PHPUnit\Framework\TestCase; use Srmklive\PayPal\Tests\MockClientClasses; use Srmklive\PayPal\Tests\MockRequestPayloads; use Srmklive\PayPal\Tests\MockResponsePayloads; diff --git a/tests/Unit/Adapter/ReferencedPayoutsTest.php b/tests/Unit/Adapter/ReferencedPayoutsTest.php index c10d7bd9..300a1603 100644 --- a/tests/Unit/Adapter/ReferencedPayoutsTest.php +++ b/tests/Unit/Adapter/ReferencedPayoutsTest.php @@ -2,8 +2,8 @@ namespace Srmklive\PayPal\Tests\Unit\Adapter; +use Orchestra\Testbench\TestCase; use PHPUnit\Framework\Attributes\Test; -use PHPUnit\Framework\TestCase; use Srmklive\PayPal\Tests\MockClientClasses; use Srmklive\PayPal\Tests\MockRequestPayloads; use Srmklive\PayPal\Tests\MockResponsePayloads; diff --git a/tests/Unit/Adapter/ReportingTest.php b/tests/Unit/Adapter/ReportingTest.php index 7f307057..4f1e6af8 100644 --- a/tests/Unit/Adapter/ReportingTest.php +++ b/tests/Unit/Adapter/ReportingTest.php @@ -3,8 +3,8 @@ namespace Srmklive\PayPal\Tests\Unit\Adapter; use Carbon\Carbon; +use Orchestra\Testbench\TestCase; use PHPUnit\Framework\Attributes\Test; -use PHPUnit\Framework\TestCase; use Srmklive\PayPal\Tests\MockClientClasses; use Srmklive\PayPal\Tests\MockResponsePayloads; diff --git a/tests/Unit/Adapter/SubscriptionsTest.php b/tests/Unit/Adapter/SubscriptionsTest.php index cd1f75d5..66f9b1a2 100644 --- a/tests/Unit/Adapter/SubscriptionsTest.php +++ b/tests/Unit/Adapter/SubscriptionsTest.php @@ -2,8 +2,8 @@ namespace Srmklive\PayPal\Tests\Unit\Adapter; +use Orchestra\Testbench\TestCase; use PHPUnit\Framework\Attributes\Test; -use PHPUnit\Framework\TestCase; use Srmklive\PayPal\Tests\MockClientClasses; use Srmklive\PayPal\Tests\MockRequestPayloads; use Srmklive\PayPal\Tests\MockResponsePayloads; diff --git a/tests/Unit/Adapter/TrackersTest.php b/tests/Unit/Adapter/TrackersTest.php index 4cc6ff76..87e93348 100644 --- a/tests/Unit/Adapter/TrackersTest.php +++ b/tests/Unit/Adapter/TrackersTest.php @@ -2,8 +2,8 @@ namespace Srmklive\PayPal\Tests\Unit\Adapter; +use Orchestra\Testbench\TestCase; use PHPUnit\Framework\Attributes\Test; -use PHPUnit\Framework\TestCase; use Srmklive\PayPal\Tests\MockClientClasses; use Srmklive\PayPal\Tests\MockRequestPayloads; use Srmklive\PayPal\Tests\MockResponsePayloads; diff --git a/tests/Unit/Adapter/WebHooksEventsTest.php b/tests/Unit/Adapter/WebHooksEventsTest.php index 6490e5c6..a0c13e16 100644 --- a/tests/Unit/Adapter/WebHooksEventsTest.php +++ b/tests/Unit/Adapter/WebHooksEventsTest.php @@ -2,8 +2,8 @@ namespace Srmklive\PayPal\Tests\Unit\Adapter; +use Orchestra\Testbench\TestCase; use PHPUnit\Framework\Attributes\Test; -use PHPUnit\Framework\TestCase; use Srmklive\PayPal\Tests\MockClientClasses; use Srmklive\PayPal\Tests\MockResponsePayloads; diff --git a/tests/Unit/Adapter/WebHooksTest.php b/tests/Unit/Adapter/WebHooksTest.php index 36b9535f..8bb68d53 100644 --- a/tests/Unit/Adapter/WebHooksTest.php +++ b/tests/Unit/Adapter/WebHooksTest.php @@ -2,8 +2,8 @@ namespace Srmklive\PayPal\Tests\Unit\Adapter; +use Orchestra\Testbench\TestCase; use PHPUnit\Framework\Attributes\Test; -use PHPUnit\Framework\TestCase; use Srmklive\PayPal\Tests\MockClientClasses; use Srmklive\PayPal\Tests\MockRequestPayloads; use Srmklive\PayPal\Tests\MockResponsePayloads; diff --git a/tests/Unit/Adapter/WebHooksVerificationTest.php b/tests/Unit/Adapter/WebHooksVerificationTest.php index ac9132f1..dc6ee9bc 100644 --- a/tests/Unit/Adapter/WebHooksVerificationTest.php +++ b/tests/Unit/Adapter/WebHooksVerificationTest.php @@ -2,8 +2,8 @@ namespace Srmklive\PayPal\Tests\Unit\Adapter; +use Orchestra\Testbench\TestCase; use PHPUnit\Framework\Attributes\Test; -use PHPUnit\Framework\TestCase; use Srmklive\PayPal\Tests\MockClientClasses; use Srmklive\PayPal\Tests\MockRequestPayloads; use Srmklive\PayPal\Tests\MockResponsePayloads; diff --git a/tests/Unit/AdapterTest.php b/tests/Unit/AdapterTest.php index dbda6e5a..2e99284a 100644 --- a/tests/Unit/AdapterTest.php +++ b/tests/Unit/AdapterTest.php @@ -2,8 +2,8 @@ namespace Srmklive\PayPal\Tests\Unit; +use Orchestra\Testbench\TestCase; use PHPUnit\Framework\Attributes\Test; -use PHPUnit\Framework\TestCase; use Srmklive\PayPal\Services\PayPal as PayPalClient; use Srmklive\PayPal\Tests\MockClientClasses; use Srmklive\PayPal\Tests\MockResponsePayloads; diff --git a/tests/Unit/Client/BillingPlansTest.php b/tests/Unit/Client/BillingPlansTest.php index af10d1c6..17b45ddc 100644 --- a/tests/Unit/Client/BillingPlansTest.php +++ b/tests/Unit/Client/BillingPlansTest.php @@ -3,8 +3,8 @@ namespace Srmklive\PayPal\Tests\Unit\Client; use GuzzleHttp\Utils; +use Orchestra\Testbench\TestCase; use PHPUnit\Framework\Attributes\Test; -use PHPUnit\Framework\TestCase; use Srmklive\PayPal\Tests\MockClientClasses; use Srmklive\PayPal\Tests\MockRequestPayloads; use Srmklive\PayPal\Tests\MockResponsePayloads; diff --git a/tests/Unit/Client/CatalogProductsTest.php b/tests/Unit/Client/CatalogProductsTest.php index c1695847..58d3af57 100644 --- a/tests/Unit/Client/CatalogProductsTest.php +++ b/tests/Unit/Client/CatalogProductsTest.php @@ -3,8 +3,8 @@ namespace Srmklive\PayPal\Tests\Unit\Client; use GuzzleHttp\Utils; +use Orchestra\Testbench\TestCase; use PHPUnit\Framework\Attributes\Test; -use PHPUnit\Framework\TestCase; use Srmklive\PayPal\Tests\MockClientClasses; use Srmklive\PayPal\Tests\MockRequestPayloads; use Srmklive\PayPal\Tests\MockResponsePayloads; diff --git a/tests/Unit/Client/DisputeActionsTest.php b/tests/Unit/Client/DisputeActionsTest.php index a14454fb..fb46617c 100644 --- a/tests/Unit/Client/DisputeActionsTest.php +++ b/tests/Unit/Client/DisputeActionsTest.php @@ -3,8 +3,8 @@ namespace Srmklive\PayPal\Tests\Unit\Client; use GuzzleHttp\Utils; +use Orchestra\Testbench\TestCase; use PHPUnit\Framework\Attributes\Test; -use PHPUnit\Framework\TestCase; use Srmklive\PayPal\Tests\MockClientClasses; use Srmklive\PayPal\Tests\MockRequestPayloads; use Srmklive\PayPal\Tests\MockResponsePayloads; diff --git a/tests/Unit/Client/DisputesTest.php b/tests/Unit/Client/DisputesTest.php index 46b7d1cf..7c2be9f6 100644 --- a/tests/Unit/Client/DisputesTest.php +++ b/tests/Unit/Client/DisputesTest.php @@ -3,8 +3,8 @@ namespace Srmklive\PayPal\Tests\Unit\Client; use GuzzleHttp\Utils; +use Orchestra\Testbench\TestCase; use PHPUnit\Framework\Attributes\Test; -use PHPUnit\Framework\TestCase; use Srmklive\PayPal\Tests\MockClientClasses; use Srmklive\PayPal\Tests\MockRequestPayloads; use Srmklive\PayPal\Tests\MockResponsePayloads; diff --git a/tests/Unit/Client/IdentityTest.php b/tests/Unit/Client/IdentityTest.php index 805f70cd..bbe0d650 100644 --- a/tests/Unit/Client/IdentityTest.php +++ b/tests/Unit/Client/IdentityTest.php @@ -3,8 +3,8 @@ namespace Srmklive\PayPal\Tests\Unit\Client; use GuzzleHttp\Utils; +use Orchestra\Testbench\TestCase; use PHPUnit\Framework\Attributes\Test; -use PHPUnit\Framework\TestCase; use Srmklive\PayPal\Tests\MockClientClasses; use Srmklive\PayPal\Tests\MockRequestPayloads; use Srmklive\PayPal\Tests\MockResponsePayloads; diff --git a/tests/Unit/Client/InvoicesSearchTest.php b/tests/Unit/Client/InvoicesSearchTest.php index 2097404c..4576e0a2 100644 --- a/tests/Unit/Client/InvoicesSearchTest.php +++ b/tests/Unit/Client/InvoicesSearchTest.php @@ -3,8 +3,8 @@ namespace Srmklive\PayPal\Tests\Unit\Client; use GuzzleHttp\Utils; +use Orchestra\Testbench\TestCase; use PHPUnit\Framework\Attributes\Test; -use PHPUnit\Framework\TestCase; use Srmklive\PayPal\Tests\MockClientClasses; use Srmklive\PayPal\Tests\MockRequestPayloads; use Srmklive\PayPal\Tests\MockResponsePayloads; diff --git a/tests/Unit/Client/InvoicesTemplatesTest.php b/tests/Unit/Client/InvoicesTemplatesTest.php index 144bcd95..90d6a4a3 100644 --- a/tests/Unit/Client/InvoicesTemplatesTest.php +++ b/tests/Unit/Client/InvoicesTemplatesTest.php @@ -3,8 +3,8 @@ namespace Srmklive\PayPal\Tests\Unit\Client; use GuzzleHttp\Utils; +use Orchestra\Testbench\TestCase; use PHPUnit\Framework\Attributes\Test; -use PHPUnit\Framework\TestCase; use Srmklive\PayPal\Tests\MockClientClasses; use Srmklive\PayPal\Tests\MockRequestPayloads; use Srmklive\PayPal\Tests\MockResponsePayloads; diff --git a/tests/Unit/Client/InvoicesTest.php b/tests/Unit/Client/InvoicesTest.php index 9ff17edc..f373f9d5 100644 --- a/tests/Unit/Client/InvoicesTest.php +++ b/tests/Unit/Client/InvoicesTest.php @@ -3,8 +3,8 @@ namespace Srmklive\PayPal\Tests\Unit\Client; use GuzzleHttp\Utils; +use Orchestra\Testbench\TestCase; use PHPUnit\Framework\Attributes\Test; -use PHPUnit\Framework\TestCase; use Srmklive\PayPal\Tests\MockClientClasses; use Srmklive\PayPal\Tests\MockRequestPayloads; use Srmklive\PayPal\Tests\MockResponsePayloads; diff --git a/tests/Unit/Client/OrdersTest.php b/tests/Unit/Client/OrdersTest.php index b8ff33b8..a1407c66 100644 --- a/tests/Unit/Client/OrdersTest.php +++ b/tests/Unit/Client/OrdersTest.php @@ -3,8 +3,8 @@ namespace Srmklive\PayPal\Tests\Unit\Client; use GuzzleHttp\Utils; +use Orchestra\Testbench\TestCase; use PHPUnit\Framework\Attributes\Test; -use PHPUnit\Framework\TestCase; use Srmklive\PayPal\Tests\MockClientClasses; use Srmklive\PayPal\Tests\MockRequestPayloads; use Srmklive\PayPal\Tests\MockResponsePayloads; diff --git a/tests/Unit/Client/PartnerReferralsTest.php b/tests/Unit/Client/PartnerReferralsTest.php index 6e961a0a..50c0da10 100644 --- a/tests/Unit/Client/PartnerReferralsTest.php +++ b/tests/Unit/Client/PartnerReferralsTest.php @@ -3,8 +3,8 @@ namespace Srmklive\PayPal\Tests\Unit\Client; use GuzzleHttp\Utils; +use Orchestra\Testbench\TestCase; use PHPUnit\Framework\Attributes\Test; -use PHPUnit\Framework\TestCase; use Srmklive\PayPal\Tests\MockClientClasses; use Srmklive\PayPal\Tests\MockRequestPayloads; use Srmklive\PayPal\Tests\MockResponsePayloads; diff --git a/tests/Unit/Client/PaymentAuthorizationsTest.php b/tests/Unit/Client/PaymentAuthorizationsTest.php index a151ed9b..2e778a30 100644 --- a/tests/Unit/Client/PaymentAuthorizationsTest.php +++ b/tests/Unit/Client/PaymentAuthorizationsTest.php @@ -3,8 +3,8 @@ namespace Srmklive\PayPal\Tests\Unit\Client; use GuzzleHttp\Utils; +use Orchestra\Testbench\TestCase; use PHPUnit\Framework\Attributes\Test; -use PHPUnit\Framework\TestCase; use Srmklive\PayPal\Tests\MockClientClasses; use Srmklive\PayPal\Tests\MockRequestPayloads; use Srmklive\PayPal\Tests\MockResponsePayloads; diff --git a/tests/Unit/Client/PaymentCapturesTest.php b/tests/Unit/Client/PaymentCapturesTest.php index b8b58bda..df98bf08 100644 --- a/tests/Unit/Client/PaymentCapturesTest.php +++ b/tests/Unit/Client/PaymentCapturesTest.php @@ -3,8 +3,8 @@ namespace Srmklive\PayPal\Tests\Unit\Client; use GuzzleHttp\Utils; +use Orchestra\Testbench\TestCase; use PHPUnit\Framework\Attributes\Test; -use PHPUnit\Framework\TestCase; use Srmklive\PayPal\Tests\MockClientClasses; use Srmklive\PayPal\Tests\MockRequestPayloads; use Srmklive\PayPal\Tests\MockResponsePayloads; diff --git a/tests/Unit/Client/PaymentExperienceWebProfilesTest.php b/tests/Unit/Client/PaymentExperienceWebProfilesTest.php index 0f31fe6a..12f01cd4 100644 --- a/tests/Unit/Client/PaymentExperienceWebProfilesTest.php +++ b/tests/Unit/Client/PaymentExperienceWebProfilesTest.php @@ -3,8 +3,8 @@ namespace Srmklive\PayPal\Tests\Unit\Client; use GuzzleHttp\Utils; +use Orchestra\Testbench\TestCase; use PHPUnit\Framework\Attributes\Test; -use PHPUnit\Framework\TestCase; use Srmklive\PayPal\Tests\MockClientClasses; use Srmklive\PayPal\Tests\MockRequestPayloads; use Srmklive\PayPal\Tests\MockResponsePayloads; diff --git a/tests/Unit/Client/PaymentRefundsTest.php b/tests/Unit/Client/PaymentRefundsTest.php index fcbe3375..8dac03f2 100644 --- a/tests/Unit/Client/PaymentRefundsTest.php +++ b/tests/Unit/Client/PaymentRefundsTest.php @@ -3,8 +3,8 @@ namespace Srmklive\PayPal\Tests\Unit\Client; use GuzzleHttp\Utils; +use Orchestra\Testbench\TestCase; use PHPUnit\Framework\Attributes\Test; -use PHPUnit\Framework\TestCase; use Srmklive\PayPal\Tests\MockClientClasses; use Srmklive\PayPal\Tests\MockResponsePayloads; diff --git a/tests/Unit/Client/PayoutsTest.php b/tests/Unit/Client/PayoutsTest.php index 5678c44b..e86b1fd6 100644 --- a/tests/Unit/Client/PayoutsTest.php +++ b/tests/Unit/Client/PayoutsTest.php @@ -3,8 +3,8 @@ namespace Srmklive\PayPal\Tests\Unit\Client; use GuzzleHttp\Utils; +use Orchestra\Testbench\TestCase; use PHPUnit\Framework\Attributes\Test; -use PHPUnit\Framework\TestCase; use Srmklive\PayPal\Tests\MockClientClasses; use Srmklive\PayPal\Tests\MockRequestPayloads; use Srmklive\PayPal\Tests\MockResponsePayloads; diff --git a/tests/Unit/Client/ReferencedPayoutsTest.php b/tests/Unit/Client/ReferencedPayoutsTest.php index 17995ac2..ec758e34 100644 --- a/tests/Unit/Client/ReferencedPayoutsTest.php +++ b/tests/Unit/Client/ReferencedPayoutsTest.php @@ -3,8 +3,8 @@ namespace Srmklive\PayPal\Tests\Unit\Client; use GuzzleHttp\Utils; +use Orchestra\Testbench\TestCase; use PHPUnit\Framework\Attributes\Test; -use PHPUnit\Framework\TestCase; use Srmklive\PayPal\Tests\MockClientClasses; use Srmklive\PayPal\Tests\MockRequestPayloads; use Srmklive\PayPal\Tests\MockResponsePayloads; diff --git a/tests/Unit/Client/ReportingTest.php b/tests/Unit/Client/ReportingTest.php index 80597a16..f9dc8de5 100644 --- a/tests/Unit/Client/ReportingTest.php +++ b/tests/Unit/Client/ReportingTest.php @@ -3,8 +3,8 @@ namespace Srmklive\PayPal\Tests\Unit\Client; use GuzzleHttp\Utils; +use Orchestra\Testbench\TestCase; use PHPUnit\Framework\Attributes\Test; -use PHPUnit\Framework\TestCase; use Srmklive\PayPal\Tests\MockClientClasses; use Srmklive\PayPal\Tests\MockRequestPayloads; use Srmklive\PayPal\Tests\MockResponsePayloads; diff --git a/tests/Unit/Client/SubscriptionsTest.php b/tests/Unit/Client/SubscriptionsTest.php index dc8264fc..5abaa3fa 100644 --- a/tests/Unit/Client/SubscriptionsTest.php +++ b/tests/Unit/Client/SubscriptionsTest.php @@ -3,8 +3,8 @@ namespace Srmklive\PayPal\Tests\Unit\Client; use GuzzleHttp\Utils; +use Orchestra\Testbench\TestCase; use PHPUnit\Framework\Attributes\Test; -use PHPUnit\Framework\TestCase; use Srmklive\PayPal\Tests\MockClientClasses; use Srmklive\PayPal\Tests\MockRequestPayloads; use Srmklive\PayPal\Tests\MockResponsePayloads; diff --git a/tests/Unit/Client/TrackersTest.php b/tests/Unit/Client/TrackersTest.php index 1862fa14..d17a70cb 100644 --- a/tests/Unit/Client/TrackersTest.php +++ b/tests/Unit/Client/TrackersTest.php @@ -3,8 +3,8 @@ namespace Srmklive\PayPal\Tests\Unit\Client; use GuzzleHttp\Utils; +use Orchestra\Testbench\TestCase; use PHPUnit\Framework\Attributes\Test; -use PHPUnit\Framework\TestCase; use Srmklive\PayPal\Tests\MockClientClasses; use Srmklive\PayPal\Tests\MockRequestPayloads; use Srmklive\PayPal\Tests\MockResponsePayloads; diff --git a/tests/Unit/Client/WebHooksEventsTest.php b/tests/Unit/Client/WebHooksEventsTest.php index e861e5a4..01f141bf 100644 --- a/tests/Unit/Client/WebHooksEventsTest.php +++ b/tests/Unit/Client/WebHooksEventsTest.php @@ -3,8 +3,8 @@ namespace Srmklive\PayPal\Tests\Unit\Client; use GuzzleHttp\Utils; +use Orchestra\Testbench\TestCase; use PHPUnit\Framework\Attributes\Test; -use PHPUnit\Framework\TestCase; use Srmklive\PayPal\Tests\MockClientClasses; use Srmklive\PayPal\Tests\MockRequestPayloads; use Srmklive\PayPal\Tests\MockResponsePayloads; diff --git a/tests/Unit/Client/WebHooksTest.php b/tests/Unit/Client/WebHooksTest.php index 9f52a48c..9c0fa913 100644 --- a/tests/Unit/Client/WebHooksTest.php +++ b/tests/Unit/Client/WebHooksTest.php @@ -3,8 +3,8 @@ namespace Srmklive\PayPal\Tests\Unit\Client; use GuzzleHttp\Utils; +use Orchestra\Testbench\TestCase; use PHPUnit\Framework\Attributes\Test; -use PHPUnit\Framework\TestCase; use Srmklive\PayPal\Tests\MockClientClasses; use Srmklive\PayPal\Tests\MockRequestPayloads; use Srmklive\PayPal\Tests\MockResponsePayloads; diff --git a/tests/Unit/Client/WebHooksVerificationTest.php b/tests/Unit/Client/WebHooksVerificationTest.php index 84cbc722..55886821 100644 --- a/tests/Unit/Client/WebHooksVerificationTest.php +++ b/tests/Unit/Client/WebHooksVerificationTest.php @@ -3,8 +3,8 @@ namespace Srmklive\PayPal\Tests\Unit\Client; use GuzzleHttp\Utils; +use Orchestra\Testbench\TestCase; use PHPUnit\Framework\Attributes\Test; -use PHPUnit\Framework\TestCase; use Srmklive\PayPal\Tests\MockClientClasses; use Srmklive\PayPal\Tests\MockRequestPayloads; use Srmklive\PayPal\Tests\MockResponsePayloads; diff --git a/tests/Unit/ClientTest.php b/tests/Unit/ClientTest.php index be60255c..8f90f829 100644 --- a/tests/Unit/ClientTest.php +++ b/tests/Unit/ClientTest.php @@ -4,8 +4,8 @@ use GuzzleHttp\Client as HttpClient; use GuzzleHttp\Utils; +use Orchestra\Testbench\TestCase; use PHPUnit\Framework\Attributes\Test; -use PHPUnit\Framework\TestCase; use Srmklive\PayPal\Tests\MockClientClasses; use Srmklive\PayPal\Tests\MockResponsePayloads;