本文整理汇总了PHP中SapphireTest::tearDown方法的典型用法代码示例。如果您正苦于以下问题:PHP SapphireTest::tearDown方法的具体用法?PHP SapphireTest::tearDown怎么用?PHP SapphireTest::tearDown使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SapphireTest
的用法示例。
在下文中一共展示了SapphireTest::tearDown方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: tearDown
public function tearDown()
{
// Remove all StaticPagesQueue that might be left after running a testcase
self::empty_temp_db();
Config::inst()->unnest();
parent::tearDown();
}
示例2: tearDown
function tearDown()
{
parent::tearDown();
Chronos::set_config_dir($this->oldConf);
$this->clearTempFiles();
// finish clean
}
示例3: tearDown
public function tearDown()
{
$_SERVER['HTTP_HOST'] = $this->oldhost;
Config::unnest();
Email::set_mailer(new Mailer());
parent::tearDown();
}
示例4: tearDown
public function tearDown()
{
Injector::unnest();
SS_Datetime::clear_mock_now();
Config::unnest();
parent::tearDown();
}
示例5: tearDown
public function tearDown()
{
AssetStoreTest_SpyStore::reset();
SS_Filesystem::removeFolder($this->getBasePath());
parent::tearDown();
Config::unnest();
}
示例6: tearDown
function tearDown()
{
Object::remove_extension("SiteTree", "FilesystemPublisher('../FilesystemPublisherTest-static-folder/')");
SiteTree::$write_homepage_map = true;
FilesystemPublisher::$domain_based_caching = $this->orig['domain_based_caching'];
parent::tearDown();
}
示例7: tearDown
public function tearDown()
{
parent::tearDown();
i18n::set_locale($this->originalLocale);
Config::inst()->remove('TimeField', 'default_config');
Config::inst()->update('TimeField', 'default_config', $this->origTimeConfig);
}
示例8: tearDown
public function tearDown()
{
parent::tearDown();
i18n::set_locale($this->originalLocale);
DateField::$default_config['dateformat'] = $this->origDateFormat;
TimeField::$default_config['timeformat'] = $this->origTimeFormat;
}
示例9: tearDown
public function tearDown()
{
// TODO Remove director rule, currently API doesnt allow this
// Reinstate the original REQUEST_URI after it was modified by some tests
$_SERVER['REQUEST_URI'] = self::$originalRequestURI;
parent::tearDown();
}
示例10: tearDown
public function tearDown()
{
parent::tearDown();
unset($this->mp3player);
unset($this->socks);
unset($this->beachball);
}
示例11: tearDown
public function tearDown()
{
if ($this->origBackend) {
Image::set_backend($this->origBackend);
}
// Remove the test files that we've created
$fileIDs = $this->allFixtureIDs('Image');
foreach ($fileIDs as $fileID) {
$file = DataObject::get_by_id('Image', $fileID);
if ($file && file_exists(BASE_PATH . "/{$file->Filename}")) {
unlink(BASE_PATH . "/{$file->Filename}");
}
}
// Remove the test folders that we've created
$folderIDs = $this->allFixtureIDs('Folder');
foreach ($folderIDs as $folderID) {
$folder = DataObject::get_by_id('Folder', $folderID);
if ($folder && file_exists(BASE_PATH . "/{$folder->Filename}")) {
Filesystem::removeFolder(BASE_PATH . "/{$folder->Filename}");
}
if ($folder && file_exists(BASE_PATH . "/" . $folder->Filename . "_resampled")) {
Filesystem::removeFolder(BASE_PATH . "/" . $folder->Filename . "_resampled");
}
}
parent::tearDown();
}
示例12: tearDown
function tearDown()
{
parent::tearDown();
/*
Product::set_site_currency($this->orig['Product_site_currency']);
Product::set_supported_currencies($this->orig['Product_supported_currencies']);
*/
}
示例13: tearDown
public function tearDown()
{
while ($this->nestingLevel > 0) {
$this->nestingLevel--;
Config::unnest();
}
parent::tearDown();
}
示例14: tearDown
public function tearDown()
{
parent::tearDown();
Config::inst()->remove('VirtualPage', 'initially_copied_fields');
Config::inst()->remove('VirtualPage', 'non_virtual_fields');
VirtualPage::config()->initially_copied_fields = $this->origInitiallyCopiedFields;
VirtualPage::config()->non_virtual_fields = $this->origNonVirtualField;
}
示例15: tearDown
function tearDown()
{
parent::tearDown();
// set old member::get_unique_identifier_field value
if ($this->member_unique_identifier_field) {
Member::set_unique_identifier_field($this->member_unique_identifier_field);
}
}