From d4887a3bd84924a087dc305051cb7c5f38153fac Mon Sep 17 00:00:00 2001 From: leemyong pakvn <3759923+leemyongpakvn@users.noreply.github.com> Date: Wed, 8 Nov 2023 12:28:47 +0700 Subject: [PATCH] fix phpunit MockeryTestCase extended classes setUp return type --- tests/php/FacetedSearch/Adapter/MySQLTest.php | 2 +- tests/php/FacetedSearch/Filters/BlockTest.php | 2 +- tests/php/FacetedSearch/Filters/ConverterTest.php | 2 +- tests/php/FacetedSearch/HookDispatcherTest.php | 2 +- tests/php/FacetedSearch/Product/SearchProviderTest.php | 2 +- tests/php/FacetedSearch/Product/SearchTest.php | 2 +- tests/php/FacetedSearch/URLSerializerTest.php | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/tests/php/FacetedSearch/Adapter/MySQLTest.php b/tests/php/FacetedSearch/Adapter/MySQLTest.php index 85f95f0c2..ea01c24c3 100644 --- a/tests/php/FacetedSearch/Adapter/MySQLTest.php +++ b/tests/php/FacetedSearch/Adapter/MySQLTest.php @@ -35,7 +35,7 @@ class MySQLTest extends MockeryTestCase { private $adapter; - protected function setUp() + protected function setUp(): void { $this->adapter = new MySQL(); diff --git a/tests/php/FacetedSearch/Filters/BlockTest.php b/tests/php/FacetedSearch/Filters/BlockTest.php index 4cc5f382c..8d9c79f26 100644 --- a/tests/php/FacetedSearch/Filters/BlockTest.php +++ b/tests/php/FacetedSearch/Filters/BlockTest.php @@ -53,7 +53,7 @@ class BlockTest extends MockeryTestCase /** @var Block */ private $block; - protected function setUp() + protected function setUp(): void { $mock = Mockery::mock(Configuration::class); diff --git a/tests/php/FacetedSearch/Filters/ConverterTest.php b/tests/php/FacetedSearch/Filters/ConverterTest.php index d2508cd4e..f3c862308 100644 --- a/tests/php/FacetedSearch/Filters/ConverterTest.php +++ b/tests/php/FacetedSearch/Filters/ConverterTest.php @@ -45,7 +45,7 @@ class ConverterTest extends MockeryTestCase /** @var Block */ private $converter; - protected function setUp() + protected function setUp(): void { $mock = Mockery::mock(Configuration::class); diff --git a/tests/php/FacetedSearch/HookDispatcherTest.php b/tests/php/FacetedSearch/HookDispatcherTest.php index ccf5e3c32..a94741cbe 100644 --- a/tests/php/FacetedSearch/HookDispatcherTest.php +++ b/tests/php/FacetedSearch/HookDispatcherTest.php @@ -32,7 +32,7 @@ class HookDispatcherTest extends MockeryTestCase private $module; private $dispatcher; - protected function setUp() + protected function setUp(): void { $this->module = Mockery::mock(Ps_Facetedsearch::class); $contextMock = Mockery::mock(Context::class); diff --git a/tests/php/FacetedSearch/Product/SearchProviderTest.php b/tests/php/FacetedSearch/Product/SearchProviderTest.php index 9f73b5817..e763cbce1 100644 --- a/tests/php/FacetedSearch/Product/SearchProviderTest.php +++ b/tests/php/FacetedSearch/Product/SearchProviderTest.php @@ -110,7 +110,7 @@ function ($arg) use ($properties) { return $filter; } - protected function setUp() + protected function setUp(): void { $this->database = Mockery::mock(Db::class); $this->context = Mockery::mock(Context::class); diff --git a/tests/php/FacetedSearch/Product/SearchTest.php b/tests/php/FacetedSearch/Product/SearchTest.php index ac6ad153a..cdc71fc7e 100644 --- a/tests/php/FacetedSearch/Product/SearchTest.php +++ b/tests/php/FacetedSearch/Product/SearchTest.php @@ -39,7 +39,7 @@ class SearchTest extends MockeryTestCase */ private $search; - protected function setUp() + protected function setUp(): void { $mock = Mockery::mock(Configuration::class); $mock->shouldReceive('get') diff --git a/tests/php/FacetedSearch/URLSerializerTest.php b/tests/php/FacetedSearch/URLSerializerTest.php index 43953d33e..2704e68c3 100644 --- a/tests/php/FacetedSearch/URLSerializerTest.php +++ b/tests/php/FacetedSearch/URLSerializerTest.php @@ -30,7 +30,7 @@ class URLSerializerTest extends MockeryTestCase { private $serializer; - protected function setUp() + protected function setUp(): void { $this->serializer = new URLSerializer(); }