本文整理匯總了PHP中PilotData::SaveProfile方法的典型用法代碼示例。如果您正苦於以下問題:PHP PilotData::SaveProfile方法的具體用法?PHP PilotData::SaveProfile怎麽用?PHP PilotData::SaveProfile使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類PilotData
的用法示例。
在下文中一共展示了PilotData::SaveProfile方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: testEditUserData
function testEditUserData()
{
# Check a save profile
$save = PilotData::SaveProfile($this->pilotid, 'unittest2@email.com', 'PK', '', '', true);
$this->assertEqual(0, DB::errno());
#unset($save);
# Verify if data was written, and if it differs
$changeset1 = PilotData::GetPilotData($this->pilotid);
$this->assertNotEqual($changeset1, $this->pilot_data);
$this->assertNotEqual($changeset1->retired, $this->pilot_data->retired);
unset($data);
# Change it back
$save = PilotData::SaveProfile($this->pilotid, 'unittest@email.com', 'US', '', '', false);
$this->assertTrue($save, DB::error(), 'Reverting user data');
unset($save);
# And verify once more
$changeset2 = PilotData::GetPilotData($this->pilotid);
$this->assertNotEqual($changeset1, $changeset2);
$this->assertNotEqual($changeset1->retired, $changeset2->retired);
unset($changeset1);
unset($changeset2);
echo '<br />';
}