当前位置: 首页>>代码示例>>PHP>>正文


PHP ThinkUpUnitTestCase类代码示例

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


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


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