当前位置: 首页>>代码示例>>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;未经允许,请勿转载。