From e4ff680e4faef7ec3b6a577113e1afbe6940725e Mon Sep 17 00:00:00 2001 From: Philipp Lang Date: Tue, 19 Sep 2023 20:06:41 +0200 Subject: [PATCH] fixed PluginTest --- phpstan.neon | 6 ++++++ tests/Unit/Plugin/PluginTest.php | 3 ++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/phpstan.neon b/phpstan.neon index 23cd4431..87f3eeda 100644 --- a/phpstan.neon +++ b/phpstan.neon @@ -658,3 +658,9 @@ parameters: message: "#^Generic type Illuminate\\\\Pagination\\\\LengthAwarePaginator\\ in PHPDoc tag @return specifies 2 template types, but class Illuminate\\\\Pagination\\\\LengthAwarePaginator supports only 1\\: TValue$#" count: 1 path: app/Member/Actions/SearchAction.php + + - + message: "#^Class Plugins\\\\Test\\\\ServiceProvider not found\\.$#" + count: 1 + path: tests/Unit/Plugin/PluginTest.php + diff --git a/tests/Unit/Plugin/PluginTest.php b/tests/Unit/Plugin/PluginTest.php index 560600e2..e911e10e 100644 --- a/tests/Unit/Plugin/PluginTest.php +++ b/tests/Unit/Plugin/PluginTest.php @@ -3,6 +3,7 @@ namespace Tests\Unit\Plugin; use Tests\TestCase; +use Plugins\Test\ServiceProvider; class PluginTest extends TestCase { @@ -27,7 +28,7 @@ class PluginTest extends TestCase parent::setUp(); - $this->assertInstanceOf('Plugins\\Test\\ServiceProvider', app()->getProvider('Plugins\\Test\\ServiceProvider')); + $this->assertInstanceOf(ServiceProvider::class, app()->getProvider('Plugins\\Test\\ServiceProvider')); array_map(fn ($file) => unlink($file), glob($pluginsPath.'/*')); rmdir($pluginsPath);