當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。