本文整理汇总了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');
}
示例2: setUp
function setUp()
{
parent::setUp();
$this->language_name = "Welch";
$this->code = "we";
$this->second_name = "WELCH";
}
示例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();
}
示例4: setUp
function setUp()
{
parent::setUp();
$this->arr = $this->setUpStringArray();
$json_str = json_encode($this->arr);
file_put_contents(__DIR__ . "/data.json", $json_str);
}
示例5: setUp
/**
* Fixture -- run before every test
*/
protected function setUp()
{
parent::setUp();
$this->setMwGlobals(array('wgEnableUploads' => true, 'wgEnableAPI' => true));
wfSetupSession();
$this->clearFakeUploads();
}
示例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();
}
示例7: setUp
function setUp()
{
global $wgTitleBlacklistSources;
parent::setUp();
$this->doLogin();
$wgTitleBlacklistSources = array(array('type' => 'file', 'src' => __DIR__ . '/testSource'));
}
示例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');
}
示例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();
}
示例10: tearDown
protected function tearDown()
{
global $wgGatherAllowPublicWatchlist;
$wgGatherAllowPublicWatchlist = false;
$this->db->delete('gather_list_item', '*');
$this->db->delete('gather_list', '*');
parent::tearDown();
}
示例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';
}
示例12: setUp
protected function setUp()
{
parent::setUp();
$this->setMwGlobals(array('wgEnableUploads' => true, 'wgAllowCopyUploads' => true));
if (wfLocalFile('UploadFromUrlTest.png')->exists()) {
$this->deleteFile('UploadFromUrlTest.png');
}
}
示例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');
}
示例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();
}
示例15: setUp
/**
* Fixture -- run before every test
*/
public function setUp()
{
global $wgEnableUploads, $wgEnableAPI;
parent::setUp();
$wgEnableUploads = true;
$wgEnableAPI = true;
wfSetupSession();
$this->clearFakeUploads();
}