From bc5e02b563e7a1fb779bdce010a7e58ba90ec50a Mon Sep 17 00:00:00 2001 From: Sief Hesham Date: Mon, 25 May 2026 19:27:50 +0300 Subject: [PATCH] Update composer.json to support Laravel 13, modify README for updated requirements, and add unit tests for ServiceProvider. --- README.md | 2 +- composer.json | 2 +- tests/Unit/ServiceProviderTest.php | 36 ++++++++++++++++++++++++++++++ 3 files changed, 38 insertions(+), 2 deletions(-) create mode 100644 tests/Unit/ServiceProviderTest.php diff --git a/README.md b/README.md index 3a4ab0c..ddcd829 100644 --- a/README.md +++ b/README.md @@ -35,7 +35,7 @@ camel case**. ## Requirements * PHP 8.0+ -* Laravel 8+ +* Laravel 8, 9, 10, 11, 12, or 13 ## Installation diff --git a/composer.json b/composer.json index 71a8b92..2fe86ce 100644 --- a/composer.json +++ b/composer.json @@ -18,7 +18,7 @@ "require": { "php": "^8.0", "guzzlehttp/guzzle": "^7.10", - "illuminate/contracts": "^9.0|^10.0|^11.0|^12.0" + "illuminate/contracts": "^9.0|^10.0|^11.0|^12.0|^13.0" }, "require-dev": { "nunomaduro/collision": "^6.0", diff --git a/tests/Unit/ServiceProviderTest.php b/tests/Unit/ServiceProviderTest.php new file mode 100644 index 0000000..14ba456 --- /dev/null +++ b/tests/Unit/ServiceProviderTest.php @@ -0,0 +1,36 @@ +assertArrayHasKey( + PlaidServiceProvider::class, + $this->app->getLoadedProviders() + ); + } + + public function testPlaidSingletonIsResolved(): void + { + $plaid = $this->app->make('plaid'); + + $this->assertInstanceOf(Plaid::class, $plaid); + } + + public function testPlaidSingletonReturnsSameInstance(): void + { + $first = $this->app->make('plaid'); + $second = $this->app->make('plaid'); + + $this->assertSame($first, $second); + } +}