當前位置: 首頁>>代碼示例>>PHP>>正文


PHP TestCaseDatabase::setUp方法代碼示例

本文整理匯總了PHP中TestCaseDatabase::setUp方法的典型用法代碼示例。如果您正苦於以下問題:PHP TestCaseDatabase::setUp方法的具體用法?PHP TestCaseDatabase::setUp怎麽用?PHP TestCaseDatabase::setUp使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在TestCaseDatabase的用法示例。


在下文中一共展示了TestCaseDatabase::setUp方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: setUp

 public function setUp()
 {
     parent::setUp();
     parent::setUpBeforeClass();
     $this->saveFactoryState();
     SHFactory::$config = null;
 }
開發者ID:philbertphotos,項目名稱:JMapMyLDAP,代碼行數:7,代碼來源:SHLdapHelperDBTest.php

示例2: setUp

 /**
  * Sets up the fixture, for example, opens a network connection.
  * This method is called before a test is executed.
  *
  * @return  void
  *
  * @since   3.2
  */
 protected function setUp()
 {
     parent::setUp();
     $this->saveFactoryState();
     $this->object = new JHelper();
     JFactory::$application = $this->getMockCmsApp();
 }
開發者ID:SysBind,項目名稱:joomla-cms,代碼行數:15,代碼來源:JHelperTest.php

示例3: setUp

 /**
  * Sets up the fixture, for example, opens a network connection.
  * This method is called before a test is executed.
  *
  * @return  void
  *
  * @since   3.2
  */
 protected function setUp()
 {
     parent::setUp();
     $this->saveFactoryState();
     JFactory::$application = $this->getMockCmsApp();
     JFactory::$session = $this->getMockSession();
 }
開發者ID:joomla-projects,項目名稱:media-manager-improvement,代碼行數:15,代碼來源:JModuleHelperTest.php

示例4: setUp

 /**
  * Sets up the fixture, for example, opens a network connection.
  * This method is called before a test is executed.
  *
  * @return  void
  *
  * @since   3.2
  */
 protected function setUp()
 {
     parent::setUp();
     $this->saveFactoryState();
     JFactory::$application = $this->getMockWeb();
     $this->object = new JUcmBase('com_content.article');
 }
開發者ID:klas,項目名稱:joomla-cms,代碼行數:15,代碼來源:JUcmBaseTest.php

示例5: setUp

 /**
  * Sets up the fixture, for example, opens a network connection.
  * This method is called before a test is executed.
  *
  * @return  void
  *
  * @since   3.2
  */
 protected function setUp()
 {
     parent::setUp();
     $this->saveFactoryState();
     JFactory::$application = $this->getMockWeb();
     $this->object = new JUcmContent(JTable::getInstance('Content'), 'com_content.article');
 }
開發者ID:sural98,項目名稱:joomla-cms,代碼行數:15,代碼來源:JUcmContentTest.php

示例6: setUp

 /**
  * Sets up the fixture, for example, opens a network connection.
  * This method is called before a test is executed.
  *
  * @return  void
  *
  * @since   12.1
  */
 protected function setUp()
 {
     parent::setUp();
     $this->saveFactoryState();
     JFactory::$application = $this->getMockCmsApp();
     JFactory::$application->expects($this->any())->method('triggerEvent')->willReturn([]);
 }
開發者ID:Rai-Ka,項目名稱:joomla-cms,代碼行數:15,代碼來源:JUserHelperTest.php

示例7: setUp

 /**
  * Sets up the fixture, for example, opens a network connection.
  * This method is called before a test is executed.
  *
  * @return  void
  *
  * @since   3.2
  */
 protected function setUp()
 {
     parent::setUp();
     $this->saveFactoryState();
     JFactory::$application = $this->getMockApplication();
     $this->object = new JUcmType();
 }
開發者ID:shoffmann52,項目名稱:install-from-web-server,代碼行數:15,代碼來源:JUcmTypeTest.php

示例8: setUp

 /**
  * Sets up the fixture, for example, opens a network connection.
  * This method is called before a test is executed.
  *
  * @return  void
  *
  * @since   12.1
  */
 protected function setUp()
 {
     parent::setUp();
     $this->saveFactoryState();
     // Set the session object for JUserHelper::addUserToGroup()
     JFactory::$session = $this->getMockSession();
 }
開發者ID:klas,項目名稱:joomla-cms,代碼行數:15,代碼來源:JUserHelperTest.php

示例9: setUp

 /**
  * Sets up the fixture.
  *
  * This method is called before a test is executed.
  *
  * @return  void
  */
 protected function setUp()
 {
     JFactory::$application = $this->getMockApplication();
     JFactory::$document = $this->getMockDocument();
     $this->_instance = new JDocumentRendererMessage(JFactory::getDocument());
     parent::setUp();
 }
開發者ID:sural98,項目名稱:joomla-cms,代碼行數:14,代碼來源:JDocumentRendererMessageTest.php

示例10: setUp

 /**
  * Sets up the fixture, for example, opens a network connection.
  * This method is called before a test is executed.
  *
  * @return  void
  *
  * @since   3.4
  */
 protected function setUp()
 {
     parent::setUp();
     JUri::reset();
     $this->server = $_SERVER;
     $_SERVER['HTTP_HOST'] = 'mydomain.com';
 }
開發者ID:eshiol,項目名稱:joomla-cms,代碼行數:15,代碼來源:JRouterSiteTest.php

示例11: setUp

 /**
  * Setup each test.
  *
  * @since   3.4
  *
  * @return  void
  */
 public function setUp()
 {
     parent::setUp();
     $this->saveFactoryState();
     JFactory::$application = $this->getMockCmsApp();
     $this->object = new JModelList(array("filter_fields" => array("field1", "field2")));
 }
開發者ID:SysBind,項目名稱:joomla-cms,代碼行數:14,代碼來源:JModelListTest.php

示例12: setUp

	/**
	 * Sets up dependencies for the test.
	 *
	 * @return  void
	 *
	 * @since   11.1
	 */
	protected function setUp()
	{
		parent::setUp();

		require_once JPATH_PLATFORM . '/joomla/form/fields/accesslevel.php';
		include_once dirname(__DIR__) . '/inspectors.php';
	}
開發者ID:realityking,項目名稱:joomla-platform,代碼行數:14,代碼來源:JFormFieldAccessLevelTest.php

示例13: setUp

 /**
  * Sets up the fixture, for example, opens a network connection.
  * This method is called before a test is executed.
  *
  * @return  void
  *
  * @since   3.5
  */
 protected function setUp()
 {
     parent::setUp();
     $app = $this->getMockCmsApp();
     JFactory::$application = $app;
     $router = new JComponentRouterViewInspector($app, $app->getMenu());
     $router->set('name', 'content');
     $categories = new JComponentRouterViewconfiguration('categories');
     $categories->setKey('id');
     $router->registerView($categories);
     $category = new JComponentRouterViewconfiguration('category');
     $category->setKey('id')->setParent($categories)->setNestable()->addLayout('blog');
     $router->registerView($category);
     $article = new JComponentRouterViewconfiguration('article');
     $article->setKey('id')->setParent($category, 'catid');
     $router->registerView($article);
     $archive = new JComponentRouterViewconfiguration('archive');
     $router->registerView($archive);
     $featured = new JComponentRouterViewconfiguration('featured');
     $router->registerView($featured);
     $form = new JComponentRouterViewconfiguration('form');
     $router->registerView($form);
     $router->menu = new MockJComponentRouterRulesMenuMenuObject();
     $this->object = new JComponentRouterRulesMenuInspector($router);
 }
開發者ID:eshiol,項目名稱:joomla-cms,代碼行數:33,代碼來源:JComponentRouterRulesMenuTest.php

示例14: setUp

 /**
  * Sets up the fixture, for example, opens a network connection.
  * This method is called before a test is executed.
  *
  * @return  void
  *
  * @since   3.2
  */
 public function setUp()
 {
     parent::setUp();
     // Add JApplication and JLanguage dependencies
     $this->saveFactoryState();
     JFactory::$language = $this->getMockLanguage();
     JFactory::$application = $this->getMockCmsApp();
 }
開發者ID:joomla-projects,項目名稱:media-manager-improvement,代碼行數:16,代碼來源:JCategoriesTest.php

示例15: setUp

 /**
  * Sets up the fixture, for example, opens a network connection.
  * This method is called before a test is executed.
  *
  * @return  void
  *
  * @since   3.4
  */
 protected function setUp()
 {
     parent::setUp();
     $app = $this->getMockCmsApp();
     JFactory::$application = $app;
     JFactory::$session = $this->getMockSession();
     $this->object = new JComponentRouterViewInspector($app, $app->getMenu());
 }
開發者ID:joomla-projects,項目名稱:media-manager-improvement,代碼行數:16,代碼來源:JComponentRouterViewTest.php


注:本文中的TestCaseDatabase::setUp方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。