本文整理汇总了PHP中ApiTestCase::setUp方法的典型用法代码示例。如果您正苦于以下问题:PHP ApiTestCase::setUp方法的具体用法?PHP ApiTestCase::setUp怎么用?PHP ApiTestCase::setUp使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ApiTestCase
的用法示例。
在下文中一共展示了ApiTestCase::setUp方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: 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();
}
示例2: 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();
}
示例3: setUp
function setUp()
{
parent::setUp();
$this->doLogin();
$this->createRepo();
$this->commonApiData = array('repo' => 'Test', 'format' => 'json');
}
示例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
function setUp()
{
global $wgTitleBlacklistSources;
parent::setUp();
$this->doLogin();
$wgTitleBlacklistSources = array(array('type' => 'file', 'src' => __DIR__ . '/testSource'));
}
示例7: setUp
protected function setUp()
{
parent::setUp();
self::$users['ApiQueryWatchlistIntegrationTestUser'] = $this->getMutableTestUser();
self::$users['ApiQueryWatchlistIntegrationTestUser2'] = $this->getMutableTestUser();
$this->doLogin('ApiQueryWatchlistIntegrationTestUser');
}
示例8: setUp
function setUp()
{
parent::setUp();
$this->language_name = "Welch";
$this->code = "we";
$this->second_name = "WELCH";
}
示例9: 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');
}
示例10: 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();
}
示例11: setUp
protected function setUp()
{
parent::setUp();
$this->setMwGlobals(array('wgEnableUploads' => true, 'wgAllowCopyUploads' => true));
if (wfLocalFile('UploadFromUrlTest.png')->exists()) {
$this->deleteFile('UploadFromUrlTest.png');
}
}
示例12: 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';
}
示例13: 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();
}
示例14: setUp
/**
* Fixture -- run before every test
*/
public function setUp()
{
global $wgEnableUploads, $wgEnableAPI;
parent::setUp();
$wgEnableUploads = true;
$wgEnableAPI = true;
wfSetupSession();
$this->clearFakeUploads();
}
示例15: setUp
protected function setUp()
{
parent::setUp();
global $wgHooks;
$this->setMwGlobals(array('wgHooks' => $wgHooks, 'wgTranslateTranslationServices' => array()));
$wgHooks['TranslatePostInitGroups'] = array(array($this, 'getTestGroups'));
$mg = MessageGroups::singleton();
$mg->setCache(wfGetCache('hash'));
$mg->recache();
}