Author: Derick Rethans Date: 2006-09-26 16:21:50 +0200 (Tue, 26 Sep 2006) New Revision: 3593
Log: - Fixed a bug where the class name ezcConfigurationUnknownSetting was used instead of the correct name ezcConfigurationUnknownSettingException. Modified: trunk/Configuration/ChangeLog trunk/Configuration/src/configuration.php trunk/Configuration/tests/configuration_test.php Modified: trunk/Configuration/ChangeLog =================================================================== --- trunk/Configuration/ChangeLog 2006-09-26 14:07:01 UTC (rev 3592) +++ trunk/Configuration/ChangeLog 2006-09-26 14:21:50 UTC (rev 3593) @@ -1,3 +1,10 @@ +1.0.4 - [RELEASEDATE] +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +- Fixed a bug where the class name ezcConfigurationUnknownSetting was used + instead of the correct name ezcConfigurationUnknownSettingException. + + 1.0.3 - Monday 28 August 2006 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Modified: trunk/Configuration/src/configuration.php =================================================================== --- trunk/Configuration/src/configuration.php 2006-09-26 14:07:01 UTC (rev 3592) +++ trunk/Configuration/src/configuration.php 2006-09-26 14:21:50 UTC (rev 3593) @@ -571,7 +571,7 @@ { if ( !$this->hasSetting( $group, $settingName ) ) { - throw new ezcConfigurationUnknownSetting( $group, $settingName ); + throw new ezcConfigurationUnknownSettingException( $group, $settingName ); } unset( $this->settings[$group][$settingName] ); Modified: trunk/Configuration/tests/configuration_test.php =================================================================== --- trunk/Configuration/tests/configuration_test.php 2006-09-26 14:07:01 UTC (rev 3592) +++ trunk/Configuration/tests/configuration_test.php 2006-09-26 14:21:50 UTC (rev 3593) @@ -822,6 +822,24 @@ $configuration->getSettingsInGroup( 'TheOnlyGroup' ) ); $this->assertEquals( false, $configuration->hasSetting( 'TheOnlyGroup', 'Existing1' ) ); + + try + { + $configuration->removeSettings( 'NotExistingGroup', array( 'Existing1' ) ); + } + catch ( ezcConfigurationUnknownGroupException $e ) + { + $this->assertSame( "The settings group <NotExistingGroup> does not exist.", $e->getMessage() ); + } + + try + { + $configuration->removeSettings( 'TheOnlyGroup', array( 'NonExisting' ) ); + } + catch ( ezcConfigurationUnknownSettingException $e ) + { + $this->assertSame( "The setting <TheOnlyGroup>, <NonExisting> does not exist.", $e->getMessage() ); + } } public function testAddGroup1() @@ -930,6 +948,24 @@ } } + public function testRemoveGroupWithComments() + { + $settings = array( + 'TheOnlyGroup' => array( + 'Existing3' => 1, + ) + ); + $comments = array( + 'TheOnlyGroup' => array( + 'CommentExisting3' => 1, + ) + ); + $configuration = new ezcConfiguration( $settings, $comments ); + $configuration->removeGroup( 'TheOnlyGroup' ); + $this->assertEquals( false, $configuration->hasGroup( 'TheOnlyGroup' ) ); + $this->assertSame( true, $this->getAttribute( $configuration, 'isModified' ) ); + } + public function testRemoveAllSettings() { $settings = array( -- svn-components mailing list svn-components@lists.ez.no http://lists.ez.no/mailman/listinfo/svn-components