function testEditUserData() { # Check a save profile $save = PilotData::SaveProfile($this->pilotid, '*****@*****.**', '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, '*****@*****.**', '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 />'; }