public function testBudgetCrawlLimits()
 {
     // set all our bedget percentages to 10% for testing
     $twitter_plugin = new TwitterPlugin();
     $auth_budget_config = $twitter_plugin->api_budget_allocation_auth;
     foreach ($auth_budget_config as $function_name => $value) {
         $auth_budget_config[$function_name]['percent'] = 10;
     }
     $twitter_plugin->api_budget_allocation_auth = $auth_budget_config;
     $noauth_budget_config = $twitter_plugin->api_budget_allocation_noauth;
     foreach ($noauth_budget_config as $function_name => $value) {
         $noauth_budget_config[$function_name]['percent'] = 10;
     }
     $twitter_plugin->api_budget_allocation_noauth = $noauth_budget_config;
     // with auth
     $limits = $twitter_plugin->budgetCrawlLimits(1000, false);
     $this->assertIsA($limits, 'Array');
     $this->assertEqual(count($limits), 14);
     foreach ($limits as $limit_key => $value) {
         $this->assertEqual($value['count'], 100);
         $this->assertEqual($value['remaining'], 100);
     }
     // no auth
     $limits = $twitter_plugin->budgetCrawlLimits(1000, true);
     $this->assertIsA($limits, 'Array');
     $this->assertEqual(count($limits), 6);
     foreach ($limits as $limit_key => $value) {
         $this->assertEqual($value['count'], 100);
         $this->assertEqual($value['remaining'], 100);
     }
 }