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

PHP teardown函数代码示例

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

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



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

示例1: tearDownAfterClass

 public static function tearDownAfterClass()
 {
     if (defined('SKIPPING')) {
         return;
     }
     teardown(self::$db, DB_WIPE_FILE);
 }
开发者ID:nurulimamnotes,项目名称:flourish-old,代码行数:7,代码来源:fSQLTranslationTest.php


示例2: tearDownAfterClass

 public static function tearDownAfterClass()
 {
     if (defined('SKIPPING')) {
         return;
     }
     self::$db->execute(fix_schema(file_get_contents(DB_ALTERNATE_SCHEMA_WIPE_FILE)));
     teardown(self::$db, DB_WIPE_FILE);
 }
开发者ID:nurulimamnotes,项目名称:flourish-old,代码行数:8,代码来源:fSchemaWithMultipleSchemasTest.php


示例3: tearDownAfterClass

 public static function tearDownAfterClass()
 {
     if (defined('SKIPPING')) {
         return;
     }
     teardown(self::$db, DB_EXTENDED_TEARDOWN_FILE);
     teardown(self::$db, DB_TEARDOWN_FILE);
 }
开发者ID:netcarver,项目名称:flourish,代码行数:8,代码来源:fORMValidationTest.php


示例4: tearDownAfterClass

 public static function tearDownAfterClass()
 {
     if (defined('SKIPPING')) {
         return;
     }
     teardown(self::$db, DB_TEARDOWN_FILE);
     self::$db->__destruct();
 }
开发者ID:netcarver,项目名称:flourish,代码行数:8,代码来源:fDatabaseTest.php


示例5: assert_equals

     assert_equals(true, transient()->setup1);
 });
 // TODO this is terrible
 should("count the number of tests", function () {
     assert_equals(4, Smoothie::instance()->tests);
 });
 // TODO this is terrible
 should("count the number of assertions", function () {
     assert_equals(4, Smoothie::instance()->assertions);
 });
 context("nested in a context", function () {
     setup(function () {
         transient()->setup2 = true;
     });
     teardown(function () {
         $GLOBALS['I_RAN_TEARDOWN'] = true;
     });
     should("have called its parent setup", function () {
         assert_equals(true, transient()->setup1);
     });
     should("have called its own setup", function () {
         assert_equals(true, transient()->setup2);
     });
     context("nested in a context", function () {
         setup(function () {
             transient()->setup3 = true;
         });
         should("have called all three setups", function () {
             assert_equals(true, transient()->setup1);
             assert_equals(true, transient()->setup2);
             assert_equals(true, transient()->setup3);
开发者ID:kla,项目名称:smoothie,代码行数:31,代码来源:ContextTest.php


示例6: write_xml

/**
 * Write XML data to a file.
 * @param string $contents
 * @param string $xml_path where we write this
 */
function write_xml($contents, $xml_path)
{
    if ($fh = @fopen($xml_path, 'w')) {
        fwrite($fh, $contents);
        fclose($fh);
        print 'config.xml file written at ' . $xml_path . PHP_EOL;
    } else {
        print 'There was a problem opening ' . $xml_path . ' for writing.' . PHP_EOL;
        print 'You can paste the following contents into ' . $xml_path . PHP_EOL;
        print 'and then run:  php ./index.php --installmode=new' . PHP_EOL;
        print 'or navigate to your site via a browser and do a normal installation.' . PHP_EOL . PHP_EOL;
        print $contents;
        print PHP_EOL . PHP_EOL;
        teardown();
    }
}
开发者ID:Vitaliz,项目名称:modx_utils,代码行数:21,代码来源:installmodx.php


示例7: suite

<?php

/*
 * How to use teardown
 */
namespace Preview\DSL\TDD;

require_once __DIR__ . '/../ok.php';
suite("teardown", function () {
    teardown(function () {
        $this->usage = "run teardown each test case";
    });
    teardown(function () {
        $this->note = "teardown hooks are run in order";
    });
});
开发者ID:v2e4lisp,项目名称:preview,代码行数:16,代码来源:teardown_spec.php



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
PHP temizle函数代码示例发布时间:2022-05-23
下一篇:
PHP team_state函数代码示例发布时间: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