public function testBoolSetting() { $settings = array('Types' => array('Bool' => true, 'Float' => 3.14, 'Int' => 42, 'String' => "Components", 'Array' => array(1 => 'Een', 2 => 'Twee'))); $comments = array(); $configuration = new ezcConfiguration($settings, $comments); $bool = $configuration->getBoolSetting('Types', 'Bool'); $this->assertEquals(true, $bool); try { $configuration->getBoolSetting('Types', 'Float'); $configuration->getBoolSetting('Types', 'Int'); $configuration->getBoolSetting('Types', 'String'); $configuration->getBoolSetting('Types', 'Array'); $this->fail("Expected exception not thrown"); } catch (ezcConfigurationSettingWrongTypeException $e) { $this->assertEquals("The expected type for the setting 'Types', 'Float' is 'boolean'. The setting was of type 'double'.", $e->getMessage()); } }