当前位置: 首页>>代码示例>>PHP>>正文


PHP JInstaller::pushStep方法代码示例

本文整理汇总了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();
 }
开发者ID:realityking,项目名称:oldunittests,代码行数:16,代码来源:JInstallerTest.php

示例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()
		);
	}
开发者ID:robschley,项目名称:joomla-platform,代码行数:16,代码来源:JInstallerTest.php

示例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();
 }
开发者ID:exntu,项目名称:joomla-cms,代码行数:14,代码来源:JInstallerTest.php

示例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')));
     }
 }
开发者ID:Rai-Ka,项目名称:joomla-cms,代码行数:26,代码来源:adapter.php


注:本文中的JInstaller::pushStep方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。