本文整理汇总了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;
}
示例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;
}
示例3: tearDownOnce
function tearDownOnce()
{
parent::tearDownOnce();
DocumentationService::unregister("DocumentationViewerTests");
DocumentationService::set_automatic_registration($this->origEnabled);
DocumentationViewer::set_link_base($this->origLinkBase);
}
示例4: setUp
public function setUp()
{
parent::setUp();
Config::inst()->update('Director', 'rules', array('FormTest_Controller' => 'FormTest_Controller'));
// Suppress themes
Config::inst()->remove('SSViewer', 'theme');
}
示例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();
}
示例6: setUp
function setUp()
{
parent::setUp();
$this->useDraftSite();
// we're testing HTTP status codes before being redirected to login forms
$this->autoFollowRedirection = false;
}
示例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();
}
示例8: tearDown
function tearDown()
{
parent::tearDown();
// Static publishing will just confuse things
StaticPublisher::$disable_realtime = false;
i18n::set_locale($this->origLocale);
}
示例9: setUp
public function setUp()
{
parent::setUp();
$holderPage = $this->objFromFixture('SiteTree', 'searchformholder');
$this->mockController = new ContentController($holderPage);
$this->waitUntilIndexingFinished();
}
示例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);
}
示例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;
}
示例12: setUp
public function setUp()
{
parent::setUp();
$this->accountpage = $this->objFromFixture("AccountPage", "accountpage");
$this->controller = new AccountPage_Controller($this->accountpage);
$this->controller->init();
}
示例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);
}
示例14: setUp
function setUp()
{
parent::setUp();
// whenever a translation is created, canTranslate() is checked
$cmseditor = $this->objFromFixture('Member', 'cmseditor');
$cmseditor->logIn();
}
示例15: tearDown
public function tearDown()
{
SecurityToken::enable();
$this->folder->deleteDatabaseOnly();
Filesystem::removeFolder($this->folder->getFullPath());
parent::tearDown();
}