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