本文整理汇总了PHP中JInstaller::pushStep方法的典型用法代码示例。如果您正苦于以下问题:PHP JInstaller::pushStep方法的具体用法?PHP JInstaller::pushStep怎么用?PHP JInstaller::pushStep使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类JInstaller
的用法示例。
在下文中一共展示了JInstaller::pushStep方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: testAbortExtension
/**
* @todo Implement testAbort().
*/
public function testAbortExtension()
{
$this->saveFactoryState();
$newDbo = $this->getMock('test', array('setQuery', 'query'));
$newDbo->expects($this->once())->method('setQuery')->with($this->equalTo('DELETE FROM `#__extensions` WHERE extension_id = 3'));
$newDbo->expects($this->once())->method('Query')->with()->will($this->returnValue(true));
JFactory::$database =& $newDbo;
//$this->object = JInstaller::getInstance();
$this->object = new JInstaller();
$this->object->pushStep(array('type' => 'extension', 'id' => 3));
$this->assertThat($this->object->abort(), $this->isTrue());
$this->restoreFactoryState();
}
示例2: testAbortBadType
/**
* Test that if the type is not good we fall back properly
*
* @covers JInstaller::abort
*
* @return void
*/
public function testAbortBadType()
{
$this->object->pushStep(array('type' => 'badstep'));
$this->assertThat(
$this->object->abort(null, false),
$this->isFalse()
);
}
示例3: testAbortBadType
/**
* Test that if the type is not good we fall back properly
*/
public function testAbortBadType()
{
$this->saveFactoryState();
$newDbo = $this->getMock('test');
JFactory::$database =& $newDbo;
//$this->object = JInstaller::getInstance();
$this->object = new JInstaller();
$this->object->pushStep(array('type' => 'badstep'));
$this->assertThat($this->object->abort(null, false), $this->isFalse());
$this->restoreFactoryState();
}
示例4: createExtensionRoot
/**
* Method to create the extension root path if necessary
*
* @return void
*
* @since 3.4
* @throws RuntimeException
*/
protected function createExtensionRoot()
{
// If the extension directory does not exist, lets create it
$created = false;
if (!file_exists($this->parent->getPath('extension_root'))) {
if (!($created = JFolder::create($this->parent->getPath('extension_root')))) {
throw new RuntimeException(JText::sprintf('JLIB_INSTALLER_ABORT_CREATE_DIRECTORY', JText::_('JLIB_INSTALLER_' . $this->route), $this->parent->getPath('extension_root')));
}
}
/*
* Since we created the extension directory and will want to remove it if
* we have to roll back the installation, let's add it to the
* installation step stack
*/
if ($created) {
$this->parent->pushStep(array('type' => 'folder', 'path' => $this->parent->getPath('extension_root')));
}
}