From 6b91c7f375f74eb3c898169fcff359a69804eb66 Mon Sep 17 00:00:00 2001 From: eileen Date: Fri, 5 Jan 2024 12:09:20 +1300 Subject: [PATCH] Remove tests on outgoing handling --- tests/phpunit/Civi/Core/SettingsBagTest.php | 46 --------------------- 1 file changed, 46 deletions(-) diff --git a/tests/phpunit/Civi/Core/SettingsBagTest.php b/tests/phpunit/Civi/Core/SettingsBagTest.php index 635f42ddfb..d1cdbd22d2 100644 --- a/tests/phpunit/Civi/Core/SettingsBagTest.php +++ b/tests/phpunit/Civi/Core/SettingsBagTest.php @@ -32,50 +32,4 @@ class SettingsBagTest extends \CiviUnitTestCase { $this->assertEquals(0, $settingsBag->get('enable_innodb_fts')); } - /** - * The setting "contribution_invoice_settings" is actually a virtual value built on other settings. - * Check that various updates work as expected. - */ - public function testVirtualContributionSetting_explicit(): void { - $s = \Civi::settings(); - - $this->assertEquals(10, $s->get('contribution_invoice_settings')['due_date']); - $this->assertEquals(10, $s->get('invoice_due_date')); - $this->assertEquals(NULL, $s->getExplicit('invoice_due_date')); - - $s->set('invoice_due_date', 20); - $this->assertEquals(20, $s->get('contribution_invoice_settings')['due_date']); - $this->assertEquals(20, $s->get('invoice_due_date')); - $this->assertEquals(20, $s->getExplicit('invoice_due_date')); - - $s->set('contribution_invoice_settings', array_merge($s->get('contribution_invoice_settings'), [ - 'due_date' => 30, - ])); - $this->assertEquals(30, $s->get('contribution_invoice_settings')['due_date']); - $this->assertEquals(30, $s->get('invoice_due_date')); - $this->assertEquals(30, $s->getExplicit('invoice_due_date')); - - $s->revert('invoice_due_date'); - $this->assertEquals(10, $s->get('contribution_invoice_settings')['due_date']); - $this->assertEquals(10, $s->get('invoice_due_date')); - $this->assertEquals(NULL, $s->getExplicit('invoice_due_date')); - } - - /** - * The setting "contribution_invoice_settings" is actually a virtual value built on other settings. - * Check that mandatory values ($civicrm_settings) are respected. - */ - public function testVirtualContributionSetting_mandatory(): void { - $s = \Civi::settings(); - $this->assertEquals(10, $s->get('contribution_invoice_settings')['due_date']); - $this->assertEquals(10, $s->get('invoice_due_date')); - $this->assertEquals(NULL, $s->getExplicit('invoice_due_date')); - - $s->loadMandatory(['invoice_due_date' => 30]); - - $this->assertEquals(30, $s->get('contribution_invoice_settings')['due_date']); - $this->assertEquals(30, $s->get('invoice_due_date')); - $this->assertEquals(NULL, $s->getExplicit('invoice_due_date')); - } - } -- 2.25.1