本文整理汇总了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);
}
}