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


PHP ThinkUpUnitTestCase::setUp方法代码示例

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


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

示例1: setUp

 public function setUp()
 {
     parent::setUp();
     $webapp = Webapp::getInstance();
     $webapp->registerPlugin('InsightsGenerator', 'InsightsGeneratorPlugin');
     $webapp->setActivePlugin('InsightsGenerator');
 }
开发者ID:73sl4,项目名称:ThinkUp,代码行数:7,代码来源:TestOfInsightsGeneratorPlugin.php

示例2: setUp

    public function setUp() {
        parent::setUp();

        $test_table_sql = 'CREATE TABLE tu_test_table(' .
            'id int(11) NOT NULL AUTO_INCREMENT PRIMARY KEY,' . 
            'test_name varchar(20),' .
            'test_id int(11),' .
            'unique key test_id_idx (test_id)' .
            ')';
        $this->testdb_helper->runSQL($test_table_sql);

        $q = sprintf("INSERT INTO tu_test_table (test_name, test_id) VALUES ('name%s', %d)", 1, 1);
        for($i = 2; $i <= 20; $i++) {
            $q .= sprintf(",('name%s', %d)", $i, $i);
        }
        $this->testdb_helper->runSQL($q);

        // Insert test data into test user table
        $q = "INSERT INTO tu_users (user_id, user_name, full_name, avatar) VALUES (12, 'mary', 'Mary Jane',
        'avatar.jpg');";
        $this->testdb_helper->runSQL($q);
        $q = "INSERT INTO tu_users (user_id, user_name, full_name, avatar) VALUES (13, 'sweetmary', 'Sweet Mary Jane',
        'avatar.jpg');";
        $this->testdb_helper->runSQL($q);
    }
开发者ID:rgoncalves,项目名称:ThinkUp,代码行数:25,代码来源:TestOfPDODAO.php

示例3: setUp

 public function setUp()
 {
     parent::setUp();
     $webapp_plugin_registrar = PluginRegistrarWebapp::getInstance();
     $webapp_plugin_registrar->registerPlugin('twitter', 'TwitterPlugin');
     $this->config = Config::getInstance();
 }
开发者ID:73sl4,项目名称:ThinkUp,代码行数:7,代码来源:TestOfPostController.php

示例4: setUp

 public function setUp()
 {
     parent::setUp();
     $this->builders = self::buildData();
     $this->logger = Logger::getInstance();
     $this->dao = new StreamDataMySQLDAO();
 }
开发者ID:ngugijames,项目名称:ThinkUp,代码行数:7,代码来源:TestOfStreamDataMySQLDAO.php

示例5: setUp

 public function setUp()
 {
     parent::setUp();
     $this->logger = Logger::getInstance();
     $this->DAO = new GroupMySQLDAO();
     $this->builders = self::buildData();
 }
开发者ID:ngugijames,项目名称:ThinkUp,代码行数:7,代码来源:TestOfGroupMySQLDAO.php

示例6: setUp

 public function setUp()
 {
     parent::setUp();
     StreamMessageQueueFactory::$queue = null;
     $this->logger = Logger::getInstance();
     $this->config = Config::getInstance();
 }
开发者ID:rgroves,项目名称:ThinkUp,代码行数:7,代码来源:TestOfConsumerUserStream.php

示例7: setUp

 public function setUp()
 {
     parent::setUp();
     $webapp_plugin_registrar = PluginRegistrarWebapp::getInstance();
     $webapp_plugin_registrar->registerPlugin('facebook', 'FacebookPlugin');
     $webapp_plugin_registrar->setActivePlugin('facebook');
 }
开发者ID:nagyistoce,项目名称:ThinkUp,代码行数:7,代码来源:TestOfFacebookPlugin.php

示例8: setUp

 public function  setUp() {
     parent::setUp();
     $webapp = Webapp::getInstance();
     $crawler = Crawler::getInstance();
     $webapp->registerPlugin('flickrthumbnails', 'FlickrThumbnailsPlugin');
     $crawler->registerCrawlerPlugin('FlickrThumbnailsPlugin');
 }
开发者ID:rkabir,项目名称:ThinkUp,代码行数:7,代码来源:TestOfFlickrThumbnailsPlugin.php

示例9: setUp

 /**
  * Setup
  */
 public function setUp()
 {
     parent::setUp();
     $this->builders = array();
     $webapp = Webapp::getInstance();
     $webapp->registerPlugin('facebook', 'FacebookPlugin');
     //Add owner
     $owner_builder = FixtureBuilder::build('owners', array('id' => 1, 'full_name' => 'ThinkUp J. User', 'email' => 'me@example.com', 'is_activated' => 1));
     array_push($this->builders, $owner_builder);
     //Add instance
     $instance_builder = FixtureBuilder::build('instances', array('id' => 1, 'network_user_id' => 606837591, 'network_username' => 'Gina Trapani', 'network' => 'facebook', 'is_active' => 1));
     array_push($this->builders, $instance_builder);
     //Add owner instance_owner
     $owner_instance_builder = FixtureBuilder::build('owner_instances', array('owner_id' => 1, 'instance_id' => 1, 'oauth_access_token' => 'faux-access-token1'));
     array_push($this->builders, $owner_instance_builder);
     //Add second owner
     $owner2_builder = FixtureBuilder::build('owners', array('id' => 2, 'full_name' => 'ThinkUp J. User 2', 'email' => 'me2@example.com', 'is_activated' => 1));
     array_push($this->builders, $owner2_builder);
     //Add second instance
     $instance2_builder = FixtureBuilder::build('instances', array('id' => 2, 'network_user_id' => 668406218, 'network_username' => 'Penelope Caridad', 'network' => 'facebook', 'is_active' => 1));
     array_push($this->builders, $instance2_builder);
     //Add second owner instance_owner
     $owner_instance2_builder = FixtureBuilder::build('owner_instances', array('owner_id' => 2, 'instance_id' => 2, 'oauth_access_token' => 'faux-access-token2'));
     array_push($this->builders, $owner_instance2_builder);
     $_SERVER['SERVER_NAME'] = 'dev.thinkup.com';
     $_SERVER['HTTP_HOST'] = 'http://';
     $_SERVER['REQUEST_URI'] = '';
 }
开发者ID:NickBall,项目名称:ThinkUp,代码行数:31,代码来源:TestOfFacebookPluginConfigurationController.php

示例10: setUp

 public function setUp()
 {
     parent::setUp();
     $this->logger = Logger::getInstance();
     $r = array('id' => 1, 'network_username' => 'Gina Trapani', 'network_user_id' => '606837591', 'network_viewer_id' => '606837591', 'last_status_id' => '0', 'last_page_fetched_replies' => 0, 'last_page_fetched_tweets' => '0', 'total_posts_in_system' => '0', 'total_replies_in_system' => '0', 'total_follows_in_system' => '0', 'total_users_in_system' => '0', 'is_archive_loaded_replies' => '0', 'is_archive_loaded_follows' => '0', 'crawler_last_run' => '', 'earliest_reply_in_system' => '', 'api_calls_to_leave_unmade_per_minute' => 2, 'avg_replies_per_day' => '2', 'is_public' => '0', 'is_active' => '0', 'network' => 'facebook');
     $this->instance = new Instance($r);
 }
开发者ID:unruthless,项目名称:ThinkUp,代码行数:7,代码来源:TestOfFacebookCrawler.php

示例11: setUp

 public function setUp()
 {
     parent::setUp();
     $this->logger = Logger::getInstance();
     $r = array('id' => 1, 'network_username' => 'Gina Trapani', 'network_user_id' => '606837591', 'network_viewer_id' => '606837591', 'last_post_id' => '0', 'last_page_fetched_replies' => 0, 'last_page_fetched_tweets' => '0', 'total_posts_in_system' => '0', 'total_replies_in_system' => '0', 'total_follows_in_system' => '0', 'is_archive_loaded_replies' => '0', 'is_archive_loaded_follows' => '0', 'crawler_last_run' => '', 'earliest_reply_in_system' => '', 'avg_replies_per_day' => '2', 'is_public' => '0', 'is_active' => '0', 'network' => 'facebook', 'last_favorite_id' => '0', 'last_unfav_page_checked' => '0', 'last_page_fetched_favorites' => '0', 'owner_favs_in_system' => '0', 'total_posts_by_owner' => 0, 'posts_per_day' => 1, 'posts_per_week' => 1, 'percentage_replies' => 50, 'percentage_links' => 50, 'earliest_post_in_system' => '01-01-2009', 'favorites_profile' => '0');
     $this->instance = new Instance($r);
 }
开发者ID:hendrasaputra,项目名称:ThinkUp,代码行数:7,代码来源:TestOfFacebookCrawler.php

示例12: setUp

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

示例13: setUp

 public function setUp()
 {
     parent::setUp();
     $webapp = Webapp::getInstance();
     $webapp->registerPlugin('expandurls', 'ExpandURLsPlugin');
     $this->builders = self::buildData();
 }
开发者ID:rmanalan,项目名称:ThinkUp,代码行数:7,代码来源:TestOfExpandURLsPluginConfigurationController.php

示例14: setUp

 public function setUp()
 {
     parent::setUp();
     $webapp_plugin_registrar = PluginRegistrarWebapp::getInstance();
     $webapp_plugin_registrar->registerPlugin('googleplus', 'GooglePlusPlugin');
     $_SERVER['SERVER_NAME'] = 'test';
 }
开发者ID:dgw,项目名称:ThinkUp,代码行数:7,代码来源:TestOfGooglePlusPluginConfigurationController.php

示例15: setUp

 public function setUp()
 {
     parent::setUp();
     $webapp = Webapp::getInstance();
     $webapp->registerPlugin('googleplus', 'GooglePlusPlugin');
     $_SERVER['SERVER_NAME'] = 'dev.thinkup.com';
 }
开发者ID:rmanalan,项目名称:ThinkUp,代码行数:7,代码来源:TestOfGooglePlusPluginConfigurationController.php


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