From 703a1c6aea290c21ca4e8674b7c10a951db57d40 Mon Sep 17 00:00:00 2001 From: Seamus Lee Date: Fri, 21 May 2021 09:49:10 +1000 Subject: [PATCH] [NFC] Add in more voids to unit tests to support PHPUnit8 --- tests/phpunit/CRM/Contribute/Form/ContributionTest.php | 2 +- tests/phpunit/CRM/Event/BAO/AdditionalPaymentTest.php | 2 +- tests/phpunit/CRM/Event/Form/ParticipantTest.php | 2 +- tests/phpunit/CiviTest/CiviUnitTestCase.php | 2 +- tests/phpunit/api/v4/Entity/CaseTest.php | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/tests/phpunit/CRM/Contribute/Form/ContributionTest.php b/tests/phpunit/CRM/Contribute/Form/ContributionTest.php index b33161f66b..fa1638c405 100644 --- a/tests/phpunit/CRM/Contribute/Form/ContributionTest.php +++ b/tests/phpunit/CRM/Contribute/Form/ContributionTest.php @@ -133,7 +133,7 @@ class CRM_Contribute_Form_ContributionTest extends CiviUnitTestCase { * * @throws \CRM_Core_Exception */ - protected function assertPostConditions() { + protected function assertPostConditions(): void { $this->validateAllPayments(); } diff --git a/tests/phpunit/CRM/Event/BAO/AdditionalPaymentTest.php b/tests/phpunit/CRM/Event/BAO/AdditionalPaymentTest.php index ae19b6c2bd..ca1ed20d8f 100644 --- a/tests/phpunit/CRM/Event/BAO/AdditionalPaymentTest.php +++ b/tests/phpunit/CRM/Event/BAO/AdditionalPaymentTest.php @@ -53,7 +53,7 @@ class CRM_Event_BAO_AdditionalPaymentTest extends CiviUnitTestCase { * * @throws \CRM_Core_Exception */ - protected function assertPostConditions() { + protected function assertPostConditions(): void { $this->validateAllPayments(); $this->validateAllContributions(); } diff --git a/tests/phpunit/CRM/Event/Form/ParticipantTest.php b/tests/phpunit/CRM/Event/Form/ParticipantTest.php index d817ddeb11..d25f82e1af 100644 --- a/tests/phpunit/CRM/Event/Form/ParticipantTest.php +++ b/tests/phpunit/CRM/Event/Form/ParticipantTest.php @@ -28,7 +28,7 @@ class CRM_Event_Form_ParticipantTest extends CiviUnitTestCase { * * @throws \CRM_Core_Exception */ - protected function assertPostConditions() { + protected function assertPostConditions(): void { $this->validateAllPayments(); $this->validateAllContributions(); } diff --git a/tests/phpunit/CiviTest/CiviUnitTestCase.php b/tests/phpunit/CiviTest/CiviUnitTestCase.php index 9f2c06e3ee..b3c5348f0e 100644 --- a/tests/phpunit/CiviTest/CiviUnitTestCase.php +++ b/tests/phpunit/CiviTest/CiviUnitTestCase.php @@ -534,7 +534,7 @@ class CiviUnitTestCase extends PHPUnit\Framework\TestCase { * @throws \API_Exception * @throws \CRM_Core_Exception */ - protected function assertPostConditions() { + protected function assertPostConditions(): void { // Reset to version 3 as not all (e.g payments) work on v4 $this->_apiversion = 3; if ($this->isLocationTypesOnPostAssert) { diff --git a/tests/phpunit/api/v4/Entity/CaseTest.php b/tests/phpunit/api/v4/Entity/CaseTest.php index 9145bd8ec9..969e19c414 100644 --- a/tests/phpunit/api/v4/Entity/CaseTest.php +++ b/tests/phpunit/api/v4/Entity/CaseTest.php @@ -27,7 +27,7 @@ use api\v4\UnitTestCase; */ class CaseTest extends UnitTestCase { - public function setUp() { + public function setUp(): void { parent::setUp(); \CRM_Core_BAO_ConfigSetting::enableComponent('CiviCase'); $this->loadDataSet('CaseType'); -- 2.25.1