• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP FunctionalTest类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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


示例16: setUp

 public function setUp()
 {
     parent::setUp();
     $this->defaultToken = Config::inst()->get('TokenAuth', 'DevToken');
     // clear cache
     SS_Cache::factory('rest_cache')->clean(Zend_Cache::CLEANING_MODE_ALL);
 }
开发者ID:EduardMa,项目名称:silverstripe-rest-api,代码行数:7,代码来源:RestTest.php


示例17: setUp

 /**
  * Test setting pagination properties and returning the object
  */
 public function setUp()
 {
     parent::setUp();
     $page = new SiteTree(['Title' => "Test Page", 'URLSegment' => 'test']);
     $page->write();
     $page->publish('Stage', 'Live');
 }
开发者ID:Cyber-Duck,项目名称:Silverstripe-SEO,代码行数:10,代码来源:SEOPaginationTest.php


示例18: setUp

 function setUp()
 {
     parent::setUp();
     // @todo fix controller stack problems and re-activate
     //$this->autoFollowRedirection = false;
     CMSMenu::populate_menu();
 }
开发者ID:rodneyway,项目名称:silverstripe-cms,代码行数:7,代码来源:LeftAndMainTest.php


示例19: tearDown

 public function tearDown()
 {
     parent::tearDown();
     $_SERVER['HTTP_USER_AGENT'] = self::$originalUserAgent;
     $_SERVER['HTTP_HOST'] = self::$originalHost;
     $_SERVER['HTTP_ACCEPT'] = self::$originalAccept;
 }
开发者ID:helpfulrobot,项目名称:silverstripe-mobile,代码行数:7,代码来源:MobileSiteControllerExtensionTest.php


示例20: setUp

 function setUp()
 {
     parent::setUp();
     $parent1_published = $this->objFromFixture('Page', 'parent1_published');
     $parent1_published->publish('Stage', 'Live');
     $child1_1_published = $this->objFromFixture('Page', 'child1_1_published');
     $child1_1_published->publish('Stage', 'Live');
     $child1_2_published = $this->objFromFixture('Page', 'child1_2_published');
     $child1_2_published->publish('Stage', 'Live');
     $child1_3_orphaned = $this->objFromFixture('Page', 'child1_3_orphaned');
     $child1_3_orphaned->ParentID = 9999;
     $child1_3_orphaned->write();
     $child1_4_orphaned_published = $this->objFromFixture('Page', 'child1_4_orphaned_published');
     $child1_4_orphaned_published->ParentID = 9999;
     $child1_4_orphaned_published->write();
     $child1_4_orphaned_published->publish('Stage', 'Live');
     $grandchild1_1_2_published = $this->objFromFixture('Page', 'grandchild1_1_2_published');
     $grandchild1_1_2_published->publish('Stage', 'Live');
     $grandchild1_1_3_orphaned = $this->objFromFixture('Page', 'grandchild1_1_3_orphaned');
     $grandchild1_1_3_orphaned->ParentID = 9999;
     $grandchild1_1_3_orphaned->write();
     $grandchild1_1_4_orphaned_published = $this->objFromFixture('Page', 'grandchild1_1_4_orphaned_published');
     $grandchild1_1_4_orphaned_published->ParentID = 9999;
     $grandchild1_1_4_orphaned_published->write();
     $grandchild1_1_4_orphaned_published->publish('Stage', 'Live');
     $child2_1_published_orphaned = $this->objFromFixture('Page', 'child2_1_published_orphaned');
     $child2_1_published_orphaned->publish('Stage', 'Live');
 }
开发者ID:SustainableCoastlines,项目名称:loveyourwater,代码行数:28,代码来源:RemoveOrphanedPagesTaskTest.php



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP FunctionalTester类代码示例发布时间:2022-05-23
下一篇:
PHP FunctionArgumentOperand类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap