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


PHP FunctionalTest类代码示例

本文整理汇总了PHP中FunctionalTest的典型用法代码示例。如果您正苦于以下问题:PHP FunctionalTest类的具体用法?PHP FunctionalTest怎么用?PHP FunctionalTest使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


在下文中一共展示了FunctionalTest类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: objFromFixture

 /**
  * Avoid subsites filtering on fixture fetching.
  */
 function objFromFixture($class, $id)
 {
     Subsite::disable_subsite_filter(true);
     $obj = parent::objFromFixture($class, $id);
     Subsite::disable_subsite_filter(false);
     return $obj;
 }
开发者ID:helpfulrobot,项目名称:mikenz-silverstripe-simplesubsites,代码行数:10,代码来源:LeftAndMainSubsitesTest.php

示例2: setUp

	function setUp() {
		parent::setUp();
		
		$this->loginWithPermission('ADMIN');
		
		// creates a series of published, unpublished versions of a page
		$this->page = new Page();
		$this->page->URLSegment = "test";
		$this->page->Content = "new content";
		$this->page->write(); 
		$this->versionUnpublishedCheck = $this->page->Version;
		
		$this->page->Content = "some further content";
		$this->page->write();
		$this->page->publish('Stage', 'Live');
		$this->versionPublishCheck = $this->page->Version;
		
		$this->page->Content = "No, more changes please";
		$this->page->Title = "Changing titles too";
		$this->page->write();
		$this->versionUnpublishedCheck2 = $this->page->Version;
		
		$this->page->Title = "Final Change";
		$this->page->write();
		$this->page->publish('Stage', 'Live');
		$this->versionPublishCheck2 = $this->page->Version;
	}
开发者ID:redema,项目名称:silverstripe-cms,代码行数:27,代码来源:CMSPageHistoryControllerTest.php

示例3: tearDownOnce

 function tearDownOnce()
 {
     parent::tearDownOnce();
     DocumentationService::unregister("DocumentationViewerTests");
     DocumentationService::set_automatic_registration($this->origEnabled);
     DocumentationViewer::set_link_base($this->origLinkBase);
 }
开发者ID:nyeholt,项目名称:silverstripe-sapphiredocs,代码行数:7,代码来源:DocumentationViewerTest.php

示例4: setUp

 public function setUp()
 {
     parent::setUp();
     Config::inst()->update('Director', 'rules', array('FormTest_Controller' => 'FormTest_Controller'));
     // Suppress themes
     Config::inst()->remove('SSViewer', 'theme');
 }
开发者ID:aaronleslie,项目名称:aaronunix,代码行数:7,代码来源:FormTest.php

示例5: tearDown

 /**
  * New tests require nested urls to be enabled, but the site might not 
  * support nested URLs. 
  * This setup will enable nested-urls for this test and resets the state
  * after the tests have been performed.
  */
 public function tearDown()
 {
     if (isset($this->orig['nested_urls']) && !$this->orig['nested_urls']) {
         SiteTree::config()->nested_urls = false;
     }
     parent::tearDown();
 }
开发者ID:antons-,项目名称:silverstripe-cms,代码行数:13,代码来源:ModelAsControllerTest.php

示例6: setUp

 function setUp()
 {
     parent::setUp();
     $this->useDraftSite();
     // we're testing HTTP status codes before being redirected to login forms
     $this->autoFollowRedirection = false;
 }
开发者ID:racontemoi,项目名称:shibuichi,代码行数:7,代码来源:SiteTreePermissionsTest.php

示例7: tearDown

 /**
  * New tests require nested urls to be enabled, but the site might not 
  * support nested URLs. 
  * This setup will enable nested-urls for this test and resets the state
  * after the tests have been performed.
  */
 function tearDown()
 {
     if (isset($this->orig['nested_urls']) && !$this->orig['nested_urls']) {
         SiteTree::disable_nested_urls();
     }
     parent::tearDown();
 }
开发者ID:SustainableCoastlines,项目名称:loveyourwater,代码行数:13,代码来源:ModelAsControllerTest.php

示例8: tearDown

 function tearDown()
 {
     parent::tearDown();
     // Static publishing will just confuse things
     StaticPublisher::$disable_realtime = false;
     i18n::set_locale($this->origLocale);
 }
开发者ID:helpfulrobot,项目名称:silverstripe-cmsworkflow,代码行数:7,代码来源:WorkflowReportsTest.php

示例9: setUp

 public function setUp()
 {
     parent::setUp();
     $holderPage = $this->objFromFixture('SiteTree', 'searchformholder');
     $this->mockController = new ContentController($holderPage);
     $this->waitUntilIndexingFinished();
 }
开发者ID:aaronleslie,项目名称:aaronunix,代码行数:7,代码来源:SearchFormTest.php

示例10: setUp

 public function setUp()
 {
     parent::setUp();
     ini_set('display_errors', 1);
     ini_set("log_errors", 1);
     error_reporting(E_ALL & ~E_NOTICE & ~E_DEPRECATED);
 }
开发者ID:helpfulrobot,项目名称:dynamic-foxystripe,代码行数:7,代码来源:FS_Test.php

示例11: setUp

 public function setUp()
 {
     parent::setUp();
     // Fixtures assume Email is the field used to identify the log in identity
     Member::config()->unique_identifier_field = 'Email';
     Member::config()->lock_out_after_incorrect_logins = 10;
 }
开发者ID:maent45,项目名称:redefine_renos,代码行数:7,代码来源:BasicAuthTest.php

示例12: setUp

 public function setUp()
 {
     parent::setUp();
     $this->accountpage = $this->objFromFixture("AccountPage", "accountpage");
     $this->controller = new AccountPage_Controller($this->accountpage);
     $this->controller->init();
 }
开发者ID:hex0id,项目名称:silverstripe-shop,代码行数:7,代码来源:AccountPageTest.php

示例13: tearDown

 public function tearDown()
 {
     parent::tearDown();
     Config::inst()->update('LeftAndMain', 'extra_requirements_css', $this->backupCss);
     Config::inst()->update('LeftAndMain', 'extra_requirements_javascript', $this->backupJs);
     Requirements::set_combined_files_enabled($this->backupCombined);
 }
开发者ID:nickbooties,项目名称:silverstripe-framework,代码行数:7,代码来源:LeftAndMainTest.php

示例14: setUp

 function setUp()
 {
     parent::setUp();
     // whenever a translation is created, canTranslate() is checked
     $cmseditor = $this->objFromFixture('Member', 'cmseditor');
     $cmseditor->logIn();
 }
开发者ID:racontemoi,项目名称:shibuichi,代码行数:7,代码来源:TranslatableTest.php

示例15: tearDown

 public function tearDown()
 {
     SecurityToken::enable();
     $this->folder->deleteDatabaseOnly();
     Filesystem::removeFolder($this->folder->getFullPath());
     parent::tearDown();
 }
开发者ID:camfindlay,项目名称:silverstripe-versionedfiles,代码行数:7,代码来源:VersionedFileTest.php


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