From 6ff32d5a6c1090f14967f74d6c7822103a8a5b3c Mon Sep 17 00:00:00 2001 From: Joshua Bixler Date: Mon, 6 Nov 2023 10:57:00 -0600 Subject: [PATCH] Fix units tests with PHPunit 8 --- Test/Unit/Block/TrackPageViewTest.php | 2 +- Test/Unit/Helper/DataTest.php | 2 +- Test/Unit/Model/System/Message/EmptyWebsiteIdTest.php | 2 +- .../Observer/CheckoutCartAddProductCompleteObserverTest.php | 2 +- Test/Unit/Observer/CheckoutCartRemoveProductObserverTest.php | 2 +- .../Observer/CheckoutOnepageControllerSuccessObserverTest.php | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Test/Unit/Block/TrackPageViewTest.php b/Test/Unit/Block/TrackPageViewTest.php index 058c0de..c784d56 100644 --- a/Test/Unit/Block/TrackPageViewTest.php +++ b/Test/Unit/Block/TrackPageViewTest.php @@ -64,7 +64,7 @@ class TrackPageViewTest extends \PHPUnit\Framework\TestCase private $dbValue = 'c8f580ff-4c69-4618-a6bc-81900f20d098'; - protected function setUp() + protected function setUp(): void { $objectManager = new ObjectManager($this); $this->scopeConfigMock = $this->getMockBuilder(\Magento\Framework\App\Config\ScopeConfigInterface::class) diff --git a/Test/Unit/Helper/DataTest.php b/Test/Unit/Helper/DataTest.php index 59022c6..04a52df 100644 --- a/Test/Unit/Helper/DataTest.php +++ b/Test/Unit/Helper/DataTest.php @@ -16,7 +16,7 @@ class DataTest extends \PHPUnit\Framework\TestCase */ private $categoryFactoryMock; - public function setUp() + public function setUp(): void { $objectManager = new ObjectManager($this); $this->categoryFactoryMock = $this->getMockBuilder(CategoryFactory::class) diff --git a/Test/Unit/Model/System/Message/EmptyWebsiteIdTest.php b/Test/Unit/Model/System/Message/EmptyWebsiteIdTest.php index 41a0aae..afce64f 100644 --- a/Test/Unit/Model/System/Message/EmptyWebsiteIdTest.php +++ b/Test/Unit/Model/System/Message/EmptyWebsiteIdTest.php @@ -27,7 +27,7 @@ class EmptyWebsiteIdTest extends \PHPUnit\Framework\TestCase */ private $dbValue = 'c8f580ff-4c69-4618-a6bc-81900f20d098'; - public function setUp() + public function setUp(): void { $objectManager = new ObjectManager($this); $this->scopeConfigMock = $this->getMockBuilder(ScopeConfigInterface::class) diff --git a/Test/Unit/Observer/CheckoutCartAddProductCompleteObserverTest.php b/Test/Unit/Observer/CheckoutCartAddProductCompleteObserverTest.php index c407e21..d60bd37 100644 --- a/Test/Unit/Observer/CheckoutCartAddProductCompleteObserverTest.php +++ b/Test/Unit/Observer/CheckoutCartAddProductCompleteObserverTest.php @@ -44,7 +44,7 @@ class CheckoutCartAddProductCompleteObserverTest extends \PHPUnit\Framework\Test */ protected $dbValue = 'c8f580ff-4c69-4618-a6bc-81900f20d098'; - public function setUp() + public function setUp(): void { $objectManager = new ObjectManager($this); diff --git a/Test/Unit/Observer/CheckoutCartRemoveProductObserverTest.php b/Test/Unit/Observer/CheckoutCartRemoveProductObserverTest.php index b46d0ef..1b99829 100644 --- a/Test/Unit/Observer/CheckoutCartRemoveProductObserverTest.php +++ b/Test/Unit/Observer/CheckoutCartRemoveProductObserverTest.php @@ -44,7 +44,7 @@ class CheckoutCartRemoveProductObserverTestTest extends \PHPUnit\Framework\TestC */ protected $dbValue = 'c8f580ff-4c69-4618-a6bc-81900f20d098'; - public function setUp() + public function setUp(): void { $objectManager = new ObjectManager($this); diff --git a/Test/Unit/Observer/CheckoutOnepageControllerSuccessObserverTest.php b/Test/Unit/Observer/CheckoutOnepageControllerSuccessObserverTest.php index 0d675b8..7057fcc 100644 --- a/Test/Unit/Observer/CheckoutOnepageControllerSuccessObserverTest.php +++ b/Test/Unit/Observer/CheckoutOnepageControllerSuccessObserverTest.php @@ -2,7 +2,7 @@ class CheckoutOnepageControllerSuccessObserver extends \PHPUnit\Framework\TestCase { - public function setUp() + public function setUp(): void { }