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