validate(); $this->fail('Missing name failed to throw exception'); } catch (Exception $e) { } $role->setName('Test Role'); $role->validate(); } public function testToString() { $role = new Role(); $role->setName('Test Role'); $this->assertEquals((string) $role,'Test Role'); } }