📄 configdbstorage_test.class.php
字号:
<?php lt_include( PLOG_CLASS_PATH."class/test/helpers/lifetypetestcase.class.php" ); lt_include( PLOG_CLASS_PATH."class/config/configdbstorage.class.php" ); /** * \ingroup Test * * Test cases for the Config class, but only the database-based backend, not the file backend */ class ConfigDbStorage_Test extends LifeTypeTestCase { /** * regression test for svn revision 3726. It basically tests whether the ConfigDbStorage::getValue() * method will return the default value specified as the second parameter when the provided * key doesn't exist. */ function testGetValueWithDefaultValue() { $config = new ConfigDbStorage(); // request a bogus key and see if we get the default value $defaultValue = "333"; $value = $config->getValue( "this_key_should_really_really_not_exist", $defaultValue ); // check if they're equal (they should!) $this->assertEquals( $defaultValue, $value, "getValue() did not return the default value when a non-existant key was requested, please see svn revision 3726" ); } }?>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -