當前位置: 首頁>>代碼示例>>PHP>>正文


PHP ApiTestCase類代碼示例

本文整理匯總了PHP中ApiTestCase的典型用法代碼示例。如果您正苦於以下問題:PHP ApiTestCase類的具體用法?PHP ApiTestCase怎麽用?PHP ApiTestCase使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


在下文中一共展示了ApiTestCase類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: setUp

 protected function setUp()
 {
     parent::setUp();
     self::$users['ApiQueryWatchlistIntegrationTestUser'] = $this->getMutableTestUser();
     self::$users['ApiQueryWatchlistIntegrationTestUser2'] = $this->getMutableTestUser();
     $this->doLogin('ApiQueryWatchlistIntegrationTestUser');
 }
開發者ID:paladox,項目名稱:mediawiki,代碼行數:7,代碼來源:ApiQueryWatchlistIntegrationTest.php

示例2: setUp

 function setUp()
 {
     parent::setUp();
     $this->language_name = "Welch";
     $this->code = "we";
     $this->second_name = "WELCH";
 }
開發者ID:robertblackwell,項目名稱:srmn,代碼行數:7,代碼來源:LanguagesTest.php

示例3: setUp

 public function setUp()
 {
     parent::setUp();
     $this->setUpData();
     $this->setUpRating();
     $this->setUpProfile();
     $user = new User();
     $user->email = 'test_1@gmail.com';
     $user->password = '123456';
     $user->save();
     $follow_id = User::where('email', 'test_1@gmail.com')->first()->user_id;
     $profile = new Profile();
     $profile->user_id = $follow_id;
     $profile->follower_count = '13';
     $profile->following_count = '2';
     $profile->rate_count = '32';
     $profile->comment_count = '12';
     $profile->scan_count = '8';
     $profile->last_name = 'pro3';
     $profile->first_name = 'user login';
     $profile->save();
     $follow = new Follow();
     $follow->id = 1;
     $follow->from_id = $this->_user_id;
     $follow->to_id = $follow_id;
     $follow->save();
 }
開發者ID:anht37,項目名稱:winelover_server,代碼行數:27,代碼來源:RankingTest.php

示例4: setUp

 function setUp()
 {
     parent::setUp();
     $this->arr = $this->setUpStringArray();
     $json_str = json_encode($this->arr);
     file_put_contents(__DIR__ . "/data.json", $json_str);
 }
開發者ID:robertblackwell,項目名稱:srmn,代碼行數:7,代碼來源:StringsUploadTest.php

示例5: setUp

 /**
  * Fixture -- run before every test
  */
 protected function setUp()
 {
     parent::setUp();
     $this->setMwGlobals(array('wgEnableUploads' => true, 'wgEnableAPI' => true));
     wfSetupSession();
     $this->clearFakeUploads();
 }
開發者ID:MediaWiki-stable,項目名稱:1.26.1,代碼行數:10,代碼來源:ApiTestCaseUpload.php

示例6: setUp

 public function setUp()
 {
     parent::setUp();
     $this->setUpData();
     $this->setUpProfile();
     $user = new User();
     $user->email = 'test_1@gmail.com';
     $user->password = '123456';
     $user->save();
     $other_user = User::where('email', 'test_1@gmail.com')->first()->user_id;
     $profile = new Profile();
     $profile->user_id = $other_user;
     $profile->follower_count = '4';
     $profile->following_count = '7';
     $profile->rate_count = '6';
     $profile->comment_count = '9';
     $profile->scan_count = '15';
     $profile->last_name = 'pro2';
     $profile->first_name = 'user other 1';
     $profile->save();
     $follow = new Follow();
     $follow->from_id = $this->_user_id;
     $follow->to_id = $other_user;
     $follow->save();
 }
開發者ID:anht37,項目名稱:winelover_server,代碼行數:25,代碼來源:ProfileTest.php

示例7: setUp

 function setUp()
 {
     global $wgTitleBlacklistSources;
     parent::setUp();
     $this->doLogin();
     $wgTitleBlacklistSources = array(array('type' => 'file', 'src' => __DIR__ . '/testSource'));
 }
開發者ID:MediaWiki-stable,項目名稱:1.26.1,代碼行數:7,代碼來源:ApiQueryTitleBlacklistTest.php

示例8: setup

 public function setup()
 {
     parent::setUp();
     $data = array('id' => 'paidsupport', 'type' => 'mod');
     $this->api_admin->extension_activate($data);
     $hookService = $this->di['mod_service']('hook');
     $hookService->batchConnect('paidsupport');
 }
開發者ID:Ryan-Nolan,項目名稱:boxbilling,代碼行數:8,代碼來源:ServiceTest.php

示例9: setUp

 public function setUp()
 {
     parent::setUp();
     $this->call('POST', ApiResponse::$API_LIST['login'], array('data' => json_encode(array('fb_id' => '123456'))));
     $login = Login::all()->last();
     $this->_params['session_id'] = $login->session_id;
     $this->client->restart();
 }
開發者ID:anht37,項目名稱:winelover_server,代碼行數:8,代碼來源:LogoutTest.php

示例10: tearDown

 protected function tearDown()
 {
     global $wgGatherAllowPublicWatchlist;
     $wgGatherAllowPublicWatchlist = false;
     $this->db->delete('gather_list_item', '*');
     $this->db->delete('gather_list', '*');
     parent::tearDown();
 }
開發者ID:joakin,項目名稱:mediawiki-extensions-Gather,代碼行數:8,代碼來源:GatherTest.php

示例11: setUp

 public function setUp()
 {
     $this->_models = array('Device');
     parent::setUp();
     $this->_params = array('auth_key' => '123456', 'device_id' => '123456', 'platform' => Device::IOS);
     $this->_method = 'POST';
     $this->_uri = 'api/push_notification';
 }
開發者ID:anht37,項目名稱:winelover_server,代碼行數:8,代碼來源:RegisterDeviceTest.php

示例12: setUp

 protected function setUp()
 {
     parent::setUp();
     $this->setMwGlobals(array('wgEnableUploads' => true, 'wgAllowCopyUploads' => true));
     if (wfLocalFile('UploadFromUrlTest.png')->exists()) {
         $this->deleteFile('UploadFromUrlTest.png');
     }
 }
開發者ID:paladox,項目名稱:2,代碼行數:8,代碼來源:UploadFromUrlTest.php

示例13: __construct

 public function __construct()
 {
     parent::__construct();
     $this->_params = array('email' => 'test@gmail.com', 'password' => '123456', 'device_id' => '123456');
     $this->_method = 'POST';
     $this->_uri = 'api/register';
     $this->_models = array('User');
 }
開發者ID:anht37,項目名稱:winelover_server,代碼行數:8,代碼來源:RegisterUserTest.php

示例14: setUp

 public function setUp()
 {
     parent::setUp();
     $user = new User();
     $user->email = $this->_params['email'];
     $user->password = $this->_params['password'];
     $user->fb_id = '123456';
     $user->save();
 }
開發者ID:anht37,項目名稱:winelover_server,代碼行數:9,代碼來源:LoginTest.php

示例15: setUp

 /**
  * Fixture -- run before every test
  */
 public function setUp()
 {
     global $wgEnableUploads, $wgEnableAPI;
     parent::setUp();
     $wgEnableUploads = true;
     $wgEnableAPI = true;
     wfSetupSession();
     $this->clearFakeUploads();
 }
開發者ID:Tjorriemorrie,項目名稱:app,代碼行數:12,代碼來源:ApiTestCaseUpload.php


注:本文中的ApiTestCase類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。