setName('Test User'); try { $user->save(); $id = $user->getId(); $this->assertGreaterThan(0,$id); } catch (Exception $e) { $this->fail($e->getMessage()); } $user = new User($id); $this->assertEquals($user->getName(),'Test User'); $user->setName('Test'); $user->save(); $user = new User($id); $this->assertEquals($user->getName(),'Test'); } }