From: eileen Date: Tue, 6 Apr 2021 01:45:08 +0000 (+1200) Subject: Remove empty setUp() functions X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=3d6332298944ca5471425b910e7f1f8eaafd19bf;p=civicrm-core.git Remove empty setUp() functions --- diff --git a/tests/phpunit/CRM/Custom/Form/OptionTest.php b/tests/phpunit/CRM/Custom/Form/OptionTest.php index 33f08c89a0..6a490f196e 100644 --- a/tests/phpunit/CRM/Custom/Form/OptionTest.php +++ b/tests/phpunit/CRM/Custom/Form/OptionTest.php @@ -6,10 +6,6 @@ */ class CRM_Custom_Form_OptionTest extends CiviUnitTestCase { - public function setUp() { - parent::setUp(); - } - /** * Test the `name` field doesn't get changed when editing an existing option. */ diff --git a/tests/phpunit/CRM/Custom/Page/AJAXTest.php b/tests/phpunit/CRM/Custom/Page/AJAXTest.php index 35518957d8..7735728deb 100644 --- a/tests/phpunit/CRM/Custom/Page/AJAXTest.php +++ b/tests/phpunit/CRM/Custom/Page/AJAXTest.php @@ -15,13 +15,6 @@ */ class CRM_Custom_Page_AJAXTest extends CiviUnitTestCase { - /** - * Set up function. - */ - public function setUp() { - parent::setUp(); - } - /** * Test multi-record custom fields */ diff --git a/tests/phpunit/CRM/Event/Form/Registration/RegistrationTest.php b/tests/phpunit/CRM/Event/Form/Registration/RegistrationTest.php index f48137d1c9..956a7f2b0f 100644 --- a/tests/phpunit/CRM/Event/Form/Registration/RegistrationTest.php +++ b/tests/phpunit/CRM/Event/Form/Registration/RegistrationTest.php @@ -15,10 +15,6 @@ */ class CRM_Event_Form_Registration_RegistrationTest extends CiviUnitTestCase { - public function setUp() { - parent::setUp(); - } - /** * CRM-19626 - Test minimum value configured for priceset. */ diff --git a/tests/phpunit/CRM/Extension/BrowserTest.php b/tests/phpunit/CRM/Extension/BrowserTest.php index 7c25f65c5a..e826191eaf 100644 --- a/tests/phpunit/CRM/Extension/BrowserTest.php +++ b/tests/phpunit/CRM/Extension/BrowserTest.php @@ -6,14 +6,6 @@ */ class CRM_Extension_BrowserTest extends CiviUnitTestCase { - public function setUp() { - parent::setUp(); - } - - public function tearDown(): void { - parent::tearDown(); - } - public function testDisabled() { $browser = new CRM_Extension_Browser(FALSE, '/index.html', 'file:///itd/oesn/tmat/ter'); $this->assertEquals(FALSE, $browser->isEnabled()); diff --git a/tests/phpunit/CRM/Extension/Container/BasicTest.php b/tests/phpunit/CRM/Extension/Container/BasicTest.php index fd911ed703..43cac07d3c 100644 --- a/tests/phpunit/CRM/Extension/Container/BasicTest.php +++ b/tests/phpunit/CRM/Extension/Container/BasicTest.php @@ -6,14 +6,6 @@ */ class CRM_Extension_Container_BasicTest extends CiviUnitTestCase { - public function setUp() { - parent::setUp(); - } - - public function tearDown(): void { - parent::tearDown(); - } - public function testGetKeysEmpty() { $basedir = $this->createTempDir('ext-empty-'); $c = new CRM_Extension_Container_Basic($basedir, 'http://example/basedir', NULL, NULL); diff --git a/tests/phpunit/CRM/Extension/Container/CollectionTest.php b/tests/phpunit/CRM/Extension/Container/CollectionTest.php index bc9d419d43..6849b27922 100644 --- a/tests/phpunit/CRM/Extension/Container/CollectionTest.php +++ b/tests/phpunit/CRM/Extension/Container/CollectionTest.php @@ -15,14 +15,6 @@ */ class CRM_Extension_Container_CollectionTest extends CiviUnitTestCase { - public function setUp() { - parent::setUp(); - } - - public function tearDown(): void { - parent::tearDown(); - } - public function testGetKeysEmpty() { $c = new CRM_Extension_Container_Collection([]); $this->assertEquals($c->getKeys(), []); diff --git a/tests/phpunit/CRM/Extension/Container/StaticTest.php b/tests/phpunit/CRM/Extension/Container/StaticTest.php index 9e5f1209d8..d15e0b6f15 100644 --- a/tests/phpunit/CRM/Extension/Container/StaticTest.php +++ b/tests/phpunit/CRM/Extension/Container/StaticTest.php @@ -6,14 +6,6 @@ */ class CRM_Extension_Container_StaticTest extends CiviUnitTestCase { - public function setUp() { - parent::setUp(); - } - - public function tearDown(): void { - parent::tearDown(); - } - public function testGetKeysEmpty() { $c = new CRM_Extension_Container_Static([]); $this->assertEquals($c->getKeys(), []); diff --git a/tests/phpunit/CRM/Financial/BAO/FinancialItemTest.php b/tests/phpunit/CRM/Financial/BAO/FinancialItemTest.php index 0d016f9007..9ce799be86 100644 --- a/tests/phpunit/CRM/Financial/BAO/FinancialItemTest.php +++ b/tests/phpunit/CRM/Financial/BAO/FinancialItemTest.php @@ -15,10 +15,6 @@ */ class CRM_Financial_BAO_FinancialItemTest extends CiviUnitTestCase { - public function setUp() { - parent::setUp(); - } - /** * Clean up after each test. */ diff --git a/tests/phpunit/CRM/Financial/BAO/PaymentProcessorTest.php b/tests/phpunit/CRM/Financial/BAO/PaymentProcessorTest.php index 7c92305122..6cea4c727d 100644 --- a/tests/phpunit/CRM/Financial/BAO/PaymentProcessorTest.php +++ b/tests/phpunit/CRM/Financial/BAO/PaymentProcessorTest.php @@ -17,10 +17,6 @@ use Civi\Api4\PaymentProcessor; */ class CRM_Financial_BAO_PaymentProcessorTest extends CiviUnitTestCase { - public function setUp() { - parent::setUp(); - } - /** * Check method create() */ diff --git a/tests/phpunit/CRM/Financial/BAO/PaymentProcessorTypeTest.php b/tests/phpunit/CRM/Financial/BAO/PaymentProcessorTypeTest.php index 255edeed2a..68b3e2be70 100644 --- a/tests/phpunit/CRM/Financial/BAO/PaymentProcessorTypeTest.php +++ b/tests/phpunit/CRM/Financial/BAO/PaymentProcessorTypeTest.php @@ -15,10 +15,6 @@ */ class CRM_Financial_BAO_PaymentProcessorTypeTest extends CiviUnitTestCase { - public function setUp() { - parent::setUp(); - } - /** * Check method create() */ diff --git a/tests/phpunit/CRM/Mailing/BAO/MailingTest.php b/tests/phpunit/CRM/Mailing/BAO/MailingTest.php index 69b039002d..eb4f875239 100644 --- a/tests/phpunit/CRM/Mailing/BAO/MailingTest.php +++ b/tests/phpunit/CRM/Mailing/BAO/MailingTest.php @@ -16,10 +16,6 @@ class CRM_Mailing_BAO_MailingTest extends CiviUnitTestCase { protected $allowedContactId = 0; - public function setUp() { - parent::setUp(); - } - public function tearDown(): void { global $dbLocale; if ($dbLocale) { diff --git a/tests/phpunit/CRM/Mailing/BAO/QueryTest.php b/tests/phpunit/CRM/Mailing/BAO/QueryTest.php index 218753b795..a2b0a0f43e 100644 --- a/tests/phpunit/CRM/Mailing/BAO/QueryTest.php +++ b/tests/phpunit/CRM/Mailing/BAO/QueryTest.php @@ -13,10 +13,6 @@ class CRM_Mailing_BAO_QueryTest extends CiviUnitTestCase { return new CRM_Mailing_BAO_QueryTestDataProvider(); } - public function setUp() { - parent::setUp(); - } - public function tearDown(): void { $tablesToTruncate = [ 'civicrm_mailing_event_bounce', diff --git a/tests/phpunit/CRM/Member/StatusOverrideTypesTest.php b/tests/phpunit/CRM/Member/StatusOverrideTypesTest.php index 78cf4651f9..59f6229671 100644 --- a/tests/phpunit/CRM/Member/StatusOverrideTypesTest.php +++ b/tests/phpunit/CRM/Member/StatusOverrideTypesTest.php @@ -15,10 +15,6 @@ */ class CRM_Member_StatusOverrideTypesTest extends CiviUnitTestCase { - public function setUp() { - parent::setUp(); - } - public function testIsOverriddenReturnFalseForNoStatusOverrideType() { $statusOverrideTypes = new CRM_Member_StatusOverrideTypes(); $isOverridden = $statusOverrideTypes::isOverridden(CRM_Member_StatusOverrideTypes::NO); diff --git a/tests/phpunit/CRM/UF/Page/ProfileEditorTest.php b/tests/phpunit/CRM/UF/Page/ProfileEditorTest.php index 7ea035594e..a8525a6904 100644 --- a/tests/phpunit/CRM/UF/Page/ProfileEditorTest.php +++ b/tests/phpunit/CRM/UF/Page/ProfileEditorTest.php @@ -6,10 +6,6 @@ */ class CRM_UF_Page_ProfileEditorTest extends CiviUnitTestCase { - public function setUp() { - parent::setUp(); - } - /** * Spot check a few fields that should appear in schema. */ diff --git a/tests/phpunit/CRM/Utils/AddressTest.php b/tests/phpunit/CRM/Utils/AddressTest.php index 3ce0a367fc..0300616661 100644 --- a/tests/phpunit/CRM/Utils/AddressTest.php +++ b/tests/phpunit/CRM/Utils/AddressTest.php @@ -6,10 +6,6 @@ */ class CRM_Utils_AddressTest extends CiviUnitTestCase { - public function setUp() { - parent::setUp(); - } - public function testAddressFormat() { $contact = $this->callAPISuccess('contact', 'create', [ 'first_name' => 'Micky', diff --git a/tests/phpunit/CRM/Utils/Check/Component/EnvTest.php b/tests/phpunit/CRM/Utils/Check/Component/EnvTest.php index cb9a3201c3..87b6e3a70d 100644 --- a/tests/phpunit/CRM/Utils/Check/Component/EnvTest.php +++ b/tests/phpunit/CRM/Utils/Check/Component/EnvTest.php @@ -8,10 +8,6 @@ */ class CRM_Utils_Check_Component_EnvTest extends CiviUnitTestCase { - public function setUp() { - parent::setUp(); - } - /** * File check test should fail if reached maximum timeout. * @throws \GuzzleHttp\Exception\GuzzleException diff --git a/tests/phpunit/CRM/Utils/Check/Component/OptionGroupsTest.php b/tests/phpunit/CRM/Utils/Check/Component/OptionGroupsTest.php index d85001504e..b114d7edb4 100644 --- a/tests/phpunit/CRM/Utils/Check/Component/OptionGroupsTest.php +++ b/tests/phpunit/CRM/Utils/Check/Component/OptionGroupsTest.php @@ -8,10 +8,6 @@ */ class CRM_Utils_Check_Component_OptionGroupsTest extends CiviUnitTestCase { - public function setUp() { - parent::setUp(); - } - public function testCheckOptionGroupValues() { $optionGroup = $this->callAPISuccess('OptionGroup', 'create', [ 'name' => 'testGroup', diff --git a/tests/phpunit/CRM/Utils/HtmlToTextTest.php b/tests/phpunit/CRM/Utils/HtmlToTextTest.php index a4d2193fbf..b7cef8c3d2 100644 --- a/tests/phpunit/CRM/Utils/HtmlToTextTest.php +++ b/tests/phpunit/CRM/Utils/HtmlToTextTest.php @@ -6,10 +6,6 @@ */ class CRM_Utils_HtmlToTextTest extends CiviUnitTestCase { - public function setUp() { - parent::setUp(); - } - /** * @return array */ diff --git a/tests/phpunit/CRM/Utils/RestTest.php b/tests/phpunit/CRM/Utils/RestTest.php index 00c7d3f406..b2e5aab5e4 100644 --- a/tests/phpunit/CRM/Utils/RestTest.php +++ b/tests/phpunit/CRM/Utils/RestTest.php @@ -6,10 +6,6 @@ */ class CRM_Utils_RestTest extends CiviUnitTestCase { - public function setUp() { - parent::setUp(); - } - public function testProcessMultiple() { $_SERVER['REQUEST_METHOD'] = 'POST'; $input = [ diff --git a/tests/phpunit/CRM/Utils/RuleTest.php b/tests/phpunit/CRM/Utils/RuleTest.php index afa6a753cc..daa71cd5e1 100644 --- a/tests/phpunit/CRM/Utils/RuleTest.php +++ b/tests/phpunit/CRM/Utils/RuleTest.php @@ -6,10 +6,6 @@ */ class CRM_Utils_RuleTest extends CiviUnitTestCase { - public function setUp() { - parent::setUp(); - } - /** * @dataProvider integerDataProvider * @param $inputData diff --git a/tests/phpunit/CRM/Utils/SignerTest.php b/tests/phpunit/CRM/Utils/SignerTest.php index af730c9d38..687139568a 100644 --- a/tests/phpunit/CRM/Utils/SignerTest.php +++ b/tests/phpunit/CRM/Utils/SignerTest.php @@ -15,10 +15,6 @@ */ class CRM_Utils_SignerTest extends CiviUnitTestCase { - public function setUp() { - parent::setUp(); - } - public function testSignValidate() { $cases = []; $cases[] = [ diff --git a/tests/phpunit/CRM/Utils/StringTest.php b/tests/phpunit/CRM/Utils/StringTest.php index dcc461568c..c9d46ab108 100644 --- a/tests/phpunit/CRM/Utils/StringTest.php +++ b/tests/phpunit/CRM/Utils/StringTest.php @@ -6,10 +6,6 @@ */ class CRM_Utils_StringTest extends CiviUnitTestCase { - public function setUp() { - parent::setUp(); - } - public function testBase64Url() { $examples = [ 'a' => 'YQ', diff --git a/tests/phpunit/CRM/Utils/SystemTest.php b/tests/phpunit/CRM/Utils/SystemTest.php index f398c3d990..4bc73b4e5c 100644 --- a/tests/phpunit/CRM/Utils/SystemTest.php +++ b/tests/phpunit/CRM/Utils/SystemTest.php @@ -7,10 +7,6 @@ */ class CRM_Utils_SystemTest extends CiviUnitTestCase { - public function setUp() { - parent::setUp(); - } - public function testUrlQueryString() { $config = CRM_Core_Config::singleton(); $this->assertTrue($config->userSystem instanceof CRM_Utils_System_UnitTests); diff --git a/tests/phpunit/CRM/Utils/TypeTest.php b/tests/phpunit/CRM/Utils/TypeTest.php index 48fd76ee4d..4a95156cff 100644 --- a/tests/phpunit/CRM/Utils/TypeTest.php +++ b/tests/phpunit/CRM/Utils/TypeTest.php @@ -8,10 +8,6 @@ */ class CRM_Utils_TypeTest extends CiviUnitTestCase { - public function setUp() { - parent::setUp(); - } - /** * @dataProvider validateDataProvider * @param $inputData diff --git a/tests/phpunit/Civi/API/Subscriber/WhitelistSubscriberTest.php b/tests/phpunit/Civi/API/Subscriber/WhitelistSubscriberTest.php index 2ff64e595d..768b8fe12a 100644 --- a/tests/phpunit/Civi/API/Subscriber/WhitelistSubscriberTest.php +++ b/tests/phpunit/Civi/API/Subscriber/WhitelistSubscriberTest.php @@ -337,10 +337,6 @@ class WhitelistSubscriberTest extends \CiviUnitTestCase { return $c; } - protected function setUp() { - parent::setUp(); - } - /** * @param array $apiRequest * Array(entity=>$,action=>$,params=>$,expectedResults=>$).