本文整理匯總了PHP中JLanguage::getDebug方法的典型用法代碼示例。如果您正苦於以下問題:PHP JLanguage::getDebug方法的具體用法?PHP JLanguage::getDebug怎麽用?PHP JLanguage::getDebug使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類JLanguage
的用法示例。
在下文中一共展示了JLanguage::getDebug方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: testGetSetDebug
/**
* Test...
*
* @covers JLanguage::setDebug
* @covers JLanguage::getDebug
*
* @return void
*/
public function testGetSetDebug()
{
$current = $this->object->getDebug();
$this->assertEquals(
$current,
$this->object->setDebug(true),
'Line: ' . __LINE__
);
$this->object->setDebug(false);
$this->assertFalse(
$this->object->getDebug(),
'Line: ' . __LINE__
);
$this->object->setDebug(true);
$this->assertTrue(
$this->object->getDebug(),
'Line: ' . __LINE__
);
$this->object->setDebug(0);
$this->assertFalse(
$this->object->getDebug(),
'Line: ' . __LINE__
);
$this->object->setDebug(1);
$this->assertTrue(
$this->object->getDebug(),
'Line: ' . __LINE__
);
$this->object->setDebug('');
$this->assertFalse(
$this->object->getDebug(),
'Line: ' . __LINE__
);
$this->object->setDebug('test');
$this->assertTrue(
$this->object->getDebug(),
'Line: ' . __LINE__
);
$this->object->setDebug('0');
$this->assertFalse(
$this->object->getDebug(),
'Line: ' . __LINE__
);
}
示例2: testGetDebug
/**
* @todo Implement testGetDebug().
*/
public function testGetDebug()
{
$lang = new JLanguage('');
// The first time you run the method returns NULL
// Only if there is an setDebug, this test is wrong
$this->assertFalse($lang->getDebug());
}