public function setUp()
 {
     parent::setUp();
     $webapp = Webapp::getInstance();
     $webapp->registerPlugin('InsightsGenerator', 'InsightsGeneratorPlugin');
     $webapp->setActivePlugin('InsightsGenerator');
 }
예제 #2
0
    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);
    }
예제 #3
0
 public function setUp()
 {
     parent::setUp();
     $webapp_plugin_registrar = PluginRegistrarWebapp::getInstance();
     $webapp_plugin_registrar->registerPlugin('twitter', 'TwitterPlugin');
     $this->config = Config::getInstance();
 }
 public function setUp()
 {
     parent::setUp();
     $this->builders = self::buildData();
     $this->logger = Logger::getInstance();
     $this->dao = new StreamDataMySQLDAO();
 }
예제 #5
0
 public function setUp()
 {
     parent::setUp();
     $this->logger = Logger::getInstance();
     $this->DAO = new GroupMySQLDAO();
     $this->builders = self::buildData();
 }
예제 #6
0
 public function setUp()
 {
     parent::setUp();
     StreamMessageQueueFactory::$queue = null;
     $this->logger = Logger::getInstance();
     $this->config = Config::getInstance();
 }
예제 #7
0
 public function setUp()
 {
     parent::setUp();
     $webapp_plugin_registrar = PluginRegistrarWebapp::getInstance();
     $webapp_plugin_registrar->registerPlugin('facebook', 'FacebookPlugin');
     $webapp_plugin_registrar->setActivePlugin('facebook');
 }
예제 #8
0
 public function setUp()
 {
     parent::setUp();
     $webapp_plugin_registrar = PluginRegistrarWebapp::getInstance();
     $webapp_plugin_registrar->registerPlugin('youtube', 'YouTubePlugin');
     $webapp_plugin_registrar->setActivePlugin('youtube');
 }
 public function  setUp() {
     parent::setUp();
     $webapp = Webapp::getInstance();
     $crawler = Crawler::getInstance();
     $webapp->registerPlugin('flickrthumbnails', 'FlickrThumbnailsPlugin');
     $crawler->registerCrawlerPlugin('FlickrThumbnailsPlugin');
 }
 /**
  * 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' => '*****@*****.**', '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' => '*****@*****.**', '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'] = '';
 }
예제 #11
0
 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);
 }
예제 #12
0
 public function setUp()
 {
     parent::setUp();
     $webapp = Webapp::getInstance();
     $webapp->registerPlugin('google+', 'HelloThinkUpPlugin');
     $webapp->setActivePlugin('google+');
 }
 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);
 }
 public function setUp()
 {
     parent::setUp();
     $webapp = Webapp::getInstance();
     $webapp->registerPlugin('twitter', 'TwitterPlugin');
     $webapp->registerPlugin('facebook', 'FacebookPlugin');
 }
 public function setUp()
 {
     parent::setUp();
     $webapp = Webapp::getInstance();
     $webapp->registerPlugin('expandurls', 'ExpandURLsPlugin');
     $this->builders = self::buildData();
 }
 public function setUp()
 {
     parent::setUp();
     $webapp_plugin_registrar = PluginRegistrarWebapp::getInstance();
     $webapp_plugin_registrar->registerPlugin('googleplus', 'GooglePlusPlugin');
     $_SERVER['SERVER_NAME'] = 'test';
 }
 public function setUp()
 {
     parent::setUp();
     $webapp = Webapp::getInstance();
     $webapp->registerPlugin('googleplus', 'GooglePlusPlugin');
     $_SERVER['SERVER_NAME'] = 'dev.thinkup.com';
 }
 public function setUp()
 {
     parent::setUp();
     $webapp_plugin_registrar = PluginRegistrarWebapp::getInstance();
     $webapp_plugin_registrar->registerPlugin('youtube', 'YouTubePlugin');
     $_SERVER['SERVER_NAME'] = 'test';
 }
예제 #19
0
 public function setUp()
 {
     parent::setUp();
     $config = Config::getInstance();
     $this->prefix = $config->getValue('table_prefix');
     $this->builders = self::buildData();
 }
예제 #20
0
 public function setUp()
 {
     parent::setUp();
     $config = Config::getInstance();
     $this->builders = self::buildData();
     $this->dao = new FavoritePostMySQLDAO();
 }
 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='*****@*****.**',\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++;
     }
 }
예제 #22
0
 public function setUp()
 {
     parent::setUp();
     $webapp_plugin_registrar = PluginRegistrarWebapp::getInstance();
     $webapp_plugin_registrar->registerPlugin('instagram', 'InstagramPlugin');
     $webapp_plugin_registrar->setActivePlugin('instagram');
 }
예제 #23
0
 public function setUp()
 {
     parent::setUp();
     $webapp_plugin_registrar = PluginRegistrarWebapp::getInstance();
     $webapp_plugin_registrar->registerPlugin('google+', 'GooglePlusPlugin');
     $webapp_plugin_registrar->setActivePlugin('google+');
 }
예제 #24
0
 public function setUp()
 {
     parent::setUp();
     $this->logger = Logger::getInstance();
     $r = array('id' => 1, 'network_username' => 'Gina Trapani', 'network_user_id' => '113612142759476883204', 'network_viewer_id' => '113612142759476883204', 'last_post_id' => '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' => 'google+', 'last_favorite_id' => '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' => '2009-01-01 13:48:05', 'favorites_profile' => '0');
     $this->profile1_instance = new Instance($r);
 }
 public function setUp()
 {
     parent::setUp();
     $webapp = Webapp::getInstance();
     $webapp->registerPlugin('twitter', 'TwitterPlugin');
     $this->builders = self::buildData();
 }
 public function setUp()
 {
     parent::setUp();
     $this->builder = self::buildData();
     $config = Config::getInstance();
     $config->setValue('debug', true);
 }
예제 #27
0
 public function setUp()
 {
     parent::setUp();
     $this->DAO = new OwnerMySQLDAO();
     $this->builders = self::buildData();
     $this->config = Config::getInstance();
 }
예제 #28
0
 public function setUp()
 {
     parent::setUp();
     $webapp = Webapp::getInstance();
     $webapp->registerPlugin('google+', 'TwitterRealtimePlugin');
     $webapp->setActivePlugin('google+');
 }
 public function setUp()
 {
     parent::setUp();
     $this->logger = Logger::getInstance();
     $this->config = Config::getInstance();
     $this->table_prefix = $this->config->getValue('table_prefix');
 }
 public function setUp()
 {
     parent::setUp();
     $webapp = Webapp::getInstance();
     $webapp->registerPlugin('InsightsGenerator', 'InsightsGeneratorPlugin');
     $_SERVER['SERVER_NAME'] = 'dev.thinkup.com';
 }