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

PHP ThinkUpUnitTestCase类代码示例

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

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



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

示例1: setUp

 public function setUp()
 {
     global $TEST_SERVER_DOMAIN;
     $this->url = $TEST_SERVER_DOMAIN;
     $this->DEBUG = getenv('TEST_DEBUG') !== false ? true : false;
     putenv("MODE=TESTS");
     $this->get($this->url . '/install/setmode.php?m=tests');
     self::isWebTestEnvironmentReady();
     require THINKUP_ROOT_PATH . 'tests/config.tests.inc.php';
     $this->test_database_name = $TEST_DATABASE;
     if (ThinkUpUnitTestCase::ramDiskTestMode()) {
         putenv("RD_MODE=1");
         require THINKUP_WEBAPP_PATH . 'config.inc.php';
         $this->test_database_name = $THINKUP_CFG['db_name'];
         $this->get($this->url . '/install/setmode.php?rd=1');
     }
 }
开发者ID:rmanalan,项目名称:ThinkUp,代码行数:17,代码来源:class.ThinkUpBasicWebTestCase.php


示例2: tearDown

 public function tearDown()
 {
     parent::tearDown();
     $this->logger->close();
     //clear doesOwnerHaveAccessToPost query cache
     OwnerInstanceMySQLDAO::$post_access_query_cache = array();
 }
开发者ID:randi2kewl,项目名称:ThinkUp,代码行数:7,代码来源:TestOfOwnerInstanceMySQLDAO.php


示例3: setUp

 public function setUp()
 {
     parent::setUp();
     $webapp = Webapp::getInstance();
     $webapp->registerPlugin('flickr', 'ExpandURLsPlugin');
     //Add owner
     $q = "INSERT INTO tu_owners SET id=1, full_name='ThinkUp J. User', email='[email protected]',\n        is_activated=1, pwd='XXX', activation_code='8888'";
     $this->testdb_helper->runSQL($q);
     //Add instance_owner
     $q = "INSERT INTO tu_owner_instances (owner_id, instance_id) VALUES (1, 1)";
     $this->testdb_helper->runSQL($q);
     //Insert test data into test table
     $q = "INSERT INTO tu_users (user_id, user_name, full_name, avatar, last_updated) VALUES (13, 'ev',\n        'Ev Williams', 'avatar.jpg', '1/1/2005');";
     $this->testdb_helper->runSQL($q);
     //Make public
     $q = "INSERT INTO tu_instances (id, network_user_id, network_username, is_public) VALUES (1, 13, 'ev', 1);";
     $this->testdb_helper->runSQL($q);
     //Add a bunch of posts
     $counter = 0;
     while ($counter < 40) {
         $pseudo_minute = str_pad($counter, 2, "0", STR_PAD_LEFT);
         $q = "INSERT INTO tu_posts (post_id, author_user_id, author_username, author_fullname, author_avatar,\n            post_text, source, pub_date, reply_count_cache, retweet_count_cache) VALUES ({$counter}, 13, 'ev', \n            'Ev Williams', 'avatar.jpg', 'This is post {$counter}', 'web', '2006-01-01 00:{$pseudo_minute}:00', " . rand(0, 4) . ", 5);";
         $this->testdb_helper->runSQL($q);
         $counter++;
     }
 }
开发者ID:unruthless,项目名称:ThinkUp,代码行数:26,代码来源:TestOfExpandURLsPluginConfigurationController.php


示例4: tearDown

 public function tearDown()
 {
     $this->builders = null;
     parent::tearDown();
     $this->logger->close();
     $this->DAO = null;
 }
开发者ID:ngugijames,项目名称:ThinkUp,代码行数:7,代码来源:TestOfGroupMySQLDAO.php


示例5: tearDown

 public function tearDown()
 {
     $this->builder1 = null;
     $this->builder2 = null;
     $this->builder3 = null;
     parent::tearDown();
 }
开发者ID:unruthless,项目名称:ThinkUp,代码行数:7,代码来源:TestOfLoginController.php


示例6: tearDown

 public function tearDown()
 {
     parent::tearDown();
     $this->logger->close();
     // clear options cache
     PluginOptionMySQLDAO::$cached_options = array();
 }
开发者ID:unruthless,项目名称:ThinkUp,代码行数:7,代码来源:TestOfPluginOptionMySQLDAO.php


示例7: tearDown

 public function tearDown()
 {
     $this->builders = null;
     parent::tearDown();
     //make sure our db_type is set to the default...
     Config::getInstance()->setValue('db_type', 'mysql');
 }
开发者ID:hendrasaputra,项目名称:ThinkUp,代码行数:7,代码来源:TestOfDAOFactory.php


示例8: setUp

 public function setUp()
 {
     parent::setUp();
     $webapp = Webapp::getInstance();
     $webapp->registerPlugin('twitter', 'TwitterPlugin');
     $webapp->registerPlugin('facebook', 'FacebookPlugin');
 }
开发者ID:randi2kewl,项目名称:ThinkUp,代码行数:7,代码来源:TestOfDashboardController.php


示例9: tearDown

 public function tearDown()
 {
     $this->builders = null;
     $this->logger->close();
     $this->instance = null;
     $this->api = null;
     parent::tearDown();
 }
开发者ID:pepeleproso,项目名称:ThinkUp,代码行数:8,代码来源:TestOfTwitterCrawler.php


示例10: setUp

 public function setUp()
 {
     parent::setUp();
     $webapp_plugin_registrar = PluginRegistrarWebapp::getInstance();
     $webapp_plugin_registrar->registerPlugin('twitter', 'TwitterPlugin');
     $webapp_plugin_registrar->registerPlugin('facebook', 'FacebookPlugin');
     $webapp_plugin_registrar->registerPlugin('google+', 'GooglePlusPlugin');
 }
开发者ID:JWFoxJr,项目名称:ThinkUp,代码行数:8,代码来源:TestOfDashboardController.php


示例11: tearDown

 public function tearDown()
 {
     parent::tearDown();
     if (getenv("TEST_TIMING") == "1") {
         list($usec, $sec) = explode(" ", microtime());
         $finish = (double) $usec + (double) $sec;
         $runtime = round($finish - $this->start);
         printf($runtime . " seconds\n");
     }
 }
开发者ID:ngugijames,项目名称:ThinkUp,代码行数:10,代码来源:TestOfInstallerController.php


示例12: tearDown

 public function tearDown() {
     parent::tearDown();
     $zipfile = THINKUP_WEBAPP_PATH . BackupDAO::CACHE_DIR . '/thinkup_db_backup.zip';
     $backup_dir = THINKUP_WEBAPP_PATH . BackupDAO::CACHE_DIR . '/backup';
     if(file_exists($zipfile)) {
         unlink($zipfile);
     }
     if(file_exists($backup_dir)) {
         $this->recursiveDelete($backup_dir);
     }
 }
开发者ID:rgoncalves,项目名称:ThinkUp,代码行数:11,代码来源:TestOfBackupMySQLDAO.php


示例13: tearDown

 public function tearDown()
 {
     parent::tearDown();
     MockUpgradeApplicationController::$current_exception = false;
     //Clean up test installation files
     $test_app_dir = THINKUP_WEBAPP_PATH . 'test_installer';
     if (file_exists($test_app_dir)) {
         exec('rm -rf ' . $test_app_dir);
     }
     parent::tearDown();
 }
开发者ID:JWFoxJr,项目名称:ThinkUp,代码行数:11,代码来源:TestOfUpgradeApplicationController.php


示例14: tearDown

 public function tearDown()
 {
     parent::tearDown();
     $config = Config::getInstance();
     $config->setValue("mandrill_api_key", "");
     // delete test email file if it exists
     $test_email = FileDataManager::getDataPath(Mailer::EMAIL);
     if (file_exists($test_email)) {
         unlink($test_email);
     }
 }
开发者ID:ngugijames,项目名称:ThinkUp,代码行数:11,代码来源:TestOfMailer.php


示例15: tearDown

 public function tearDown() {
     parent::tearDown();
     if(file_exists($this->backup_file)) {
         unlink($this->backup_file);
     }
     if(file_exists($this->backup_test)) {
         unlink($this->backup_test);
     }
     if(file_exists($this->backup_dir)) {
         unlink($this->backup_dir);
     }
 }
开发者ID:rkabir,项目名称:ThinkUp,代码行数:12,代码来源:TestOfBackupController.php


示例16: tearDown

 public function tearDown()
 {
     parent::tearDown();
     $zipfile = FileDataManager::getBackupPath('.htthinkup_db_backup.zip');
     $backup_dir = FileDataManager::getBackupPath();
     if (file_exists($zipfile)) {
         unlink($zipfile);
     }
     if (file_exists($backup_dir)) {
         $this->recursiveDelete($backup_dir);
     }
 }
开发者ID:pepeleproso,项目名称:ThinkUp,代码行数:12,代码来源:TestOfBackupMySQLDAO.php


示例17: tearDown

 public function tearDown()
 {
     parent::tearDown();
     if (file_exists($this->backup_file)) {
         unlink($this->backup_file);
     }
     if (file_exists($this->backup_test)) {
         unlink($this->backup_test);
     }
     if (file_exists($this->backup_dir)) {
         unlink($this->backup_dir);
     }
     //set zip class requirement class name back
     BackupController::$zip_class_req = 'ZipArchive';
 }
开发者ID:randi2kewl,项目名称:ThinkUp,代码行数:15,代码来源:TestOfBackupController.php


示例18: setUp

    public function setUp()
    {
        parent::setUp();
        $session = new Session();
        $cryptpass = $session->pwdcrypt("oldpassword");
        $q = <<<SQL
INSERT INTO #prefix#owners SET
    id = 1,
    full_name = 'ThinkUp J. User',
    email = '[email protected]',
    pwd = '{$cryptpass}',
    activation_code='8888',
    is_activated =1
SQL;
        $this->testdb_helper->runSQL($q);
    }
开发者ID:NickBall,项目名称:ThinkUp,代码行数:16,代码来源:TestOfForgotPasswordController.php


示例19: tearDown

 public function tearDown()
 {
     if (file_exists($this->export_test)) {
         unlink($this->export_test);
     }
     self::deleteFile('posts.tmp');
     self::deleteFile('links.tmp');
     self::deleteFile('encoded_locations.tmp');
     self::deleteFile('favorites.tmp');
     self::deleteFile('follows.tmp');
     self::deleteFile('follower_count.tmp');
     self::deleteFile('users_from_posts.tmp');
     self::deleteFile('users_followees.tmp');
     self::deleteFile('users_followers.tmp');
     //set zip class requirement class name back
     BackupController::$zip_class_req = 'ZipArchive';
     $this->builders = null;
     parent::tearDown();
 }
开发者ID:rgroves,项目名称:ThinkUp,代码行数:19,代码来源:TestOfExportServiceUserDataController.php


示例20: setUp

    public function setUp()
    {
        parent::setUp();
        $config = Config::getInstance();
        $config->setValue('debug', true);
        $session = new Session();
        $cryptpass = $session->pwdcrypt("oldpassword");
        $q = <<<SQL
INSERT INTO #prefix#owners SET
    id = 1,
    full_name = 'ThinkUp J. User',
    email = '[email protected]',
    pwd = '{$cryptpass}',
    activation_code='8888',
    is_activated =1
SQL;
        $this->db->exec($q);
        $dao = DAOFactory::getDAO('OwnerDAO');
        $this->owner = $dao->getByEmail('[email protected]');
        $this->token = $this->owner->setPasswordRecoveryToken();
    }
开发者ID:rayyan,项目名称:ThinkUp,代码行数:21,代码来源:TestOfPasswordResetController.php



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

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