本文整理匯總了PHP中PMA_Config::getSource方法的典型用法代碼示例。如果您正苦於以下問題:PHP PMA_Config::getSource方法的具體用法?PHP PMA_Config::getSource怎麽用?PHP PMA_Config::getSource使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類PMA_Config
的用法示例。
在下文中一共展示了PMA_Config::getSource方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: testGetSetSource
/**
* Tests setting configuration source
*
* @covers PMA_Config::getSource
* @covers PMA_Config::setSource
*/
public function testGetSetSource()
{
echo $this->object->getSource();
$this->assertEmpty($this->object->getSource(), "Source is null by default");
$this->object->setSource("config.sample.inc.php");
$this->assertEquals("config.sample.inc.php", $this->object->getSource(), "Cant set new source");
}
示例2: testCheckPermissions
/**
* Should test checking of config permissions
*
* @return void
*/
public function testCheckPermissions()
{
//load file permissions for the current permissions file
$perms = @fileperms($this->object->getSource());
//testing for permissions for no configuration file
$this->assertFalse(!($perms === false) && $perms & 2);
//load file permissions for the current permissions file
$perms = @fileperms($this->permTestObj->getSource());
//testing for permissions
$this->assertFalse(!($perms === false) && $perms & 2);
//if the above assertion is false then applying further assertions
if (!($perms === false) && $perms & 2) {
$this->assertFalse($this->permTestObj->get('PMA_IS_WINDOWS') == 0);
}
}