本文整理汇总了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');
}
示例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);
}
示例3: setUp
public function setUp()
{
parent::setUp();
$webapp_plugin_registrar = PluginRegistrarWebapp::getInstance();
$webapp_plugin_registrar->registerPlugin('twitter', 'TwitterPlugin');
$this->config = Config::getInstance();
}
示例4: setUp
public function setUp()
{
parent::setUp();
$this->builders = self::buildData();
$this->logger = Logger::getInstance();
$this->dao = new StreamDataMySQLDAO();
}
示例5: setUp
public function setUp()
{
parent::setUp();
$this->logger = Logger::getInstance();
$this->DAO = new GroupMySQLDAO();
$this->builders = self::buildData();
}
示例6: setUp
public function setUp()
{
parent::setUp();
StreamMessageQueueFactory::$queue = null;
$this->logger = Logger::getInstance();
$this->config = Config::getInstance();
}
示例7: setUp
public function setUp()
{
parent::setUp();
$webapp_plugin_registrar = PluginRegistrarWebapp::getInstance();
$webapp_plugin_registrar->registerPlugin('facebook', 'FacebookPlugin');
$webapp_plugin_registrar->setActivePlugin('facebook');
}
示例8: setUp
public function setUp() {
parent::setUp();
$webapp = Webapp::getInstance();
$crawler = Crawler::getInstance();
$webapp->registerPlugin('flickrthumbnails', 'FlickrThumbnailsPlugin');
$crawler->registerCrawlerPlugin('FlickrThumbnailsPlugin');
}
示例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'] = '';
}
示例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);
}
示例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);
}
示例12: setUp
public function setUp()
{
parent::setUp();
$webapp = Webapp::getInstance();
$webapp->registerPlugin('twitter', 'TwitterPlugin');
$webapp->registerPlugin('facebook', 'FacebookPlugin');
}
示例13: setUp
public function setUp()
{
parent::setUp();
$webapp = Webapp::getInstance();
$webapp->registerPlugin('expandurls', 'ExpandURLsPlugin');
$this->builders = self::buildData();
}
示例14: setUp
public function setUp()
{
parent::setUp();
$webapp_plugin_registrar = PluginRegistrarWebapp::getInstance();
$webapp_plugin_registrar->registerPlugin('googleplus', 'GooglePlusPlugin');
$_SERVER['SERVER_NAME'] = 'test';
}
示例15: setUp
public function setUp()
{
parent::setUp();
$webapp = Webapp::getInstance();
$webapp->registerPlugin('googleplus', 'GooglePlusPlugin');
$_SERVER['SERVER_NAME'] = 'dev.thinkup.com';
}