From d8895669b36b25e4638afb2cbce280f7e5ed3d03 Mon Sep 17 00:00:00 2001 From: Sukhwinder Dhillon Date: Mon, 2 May 2022 14:00:18 +0200 Subject: [PATCH] Remove class `IniStoreTest` --- .../Icinga/User/Store/IniStoreTest.php | 71 ------------------- 1 file changed, 71 deletions(-) delete mode 100644 test/php/library/Icinga/User/Store/IniStoreTest.php diff --git a/test/php/library/Icinga/User/Store/IniStoreTest.php b/test/php/library/Icinga/User/Store/IniStoreTest.php deleted file mode 100644 index c5baef9c4..000000000 --- a/test/php/library/Icinga/User/Store/IniStoreTest.php +++ /dev/null @@ -1,71 +0,0 @@ -preferences = $preferences; - } - - public function getPreferences() - { - return $this->preferences; - } -} - -class IniStoreTest extends BaseTestCase -{ - public function testWhetherPreferenceChangesAreApplied() - { - $store = $this->getStore(); - $store->setPreferences(array('testsection' => array('key1' => '1'))); - - $store->save( - Mockery::mock('Icinga\User\Preferences', array( - 'toArray' => array('testsection' => array('key1' => '11', 'key2' => '2')) - )) - ); - $this->assertEquals( - array('testsection' => array('key1' => '11', 'key2' => '2')), - $store->getPreferences(), - 'IniStore::save does not properly apply changed preferences' - ); - } - - public function testWhetherPreferenceDeletionsAreApplied() - { - $store = $this->getStore(); - $store->setPreferences(array('testsection' => array('key' => 'value'))); - - $store->save(Mockery::mock('Icinga\User\Preferences', array('toArray' => array('testsection' => array())))); - - $result = $store->getPreferences(); - - $this->assertEmpty($result['testsection'], 'IniStore::save does not delete removed preferences'); - } - - protected function getStore() - { - return new IniStoreWithSetGetPreferencesAndEmptyWrite( - new ConfigObject( - array( - 'location' => 'some/Path/To/Some/Directory' - ) - ), - Mockery::mock('Icinga\User', array('getUsername' => 'unittest')) - ); - } -}