/** * check that access to non existing method will create error information */ public function testAccessForNonExistingMethods() { $object = new Object(); $object->executeNonExistingMethod(); $this->assertTrue($object->checkErrors()); $this->assertArrayHasKey('wrong_method', $object->returnObjectError()); $object->removeObjectError(); $this->assertFalse($object->checkErrors()); }