getValidationProcessor(); $group = new Group(); // a group must have a name $this->expectException(\DomainException::class); $this->expectExceptionMessageMatches('/Error when validating fixture \"my_wrong_fixture\"/'); $this->expectExceptionMessageMatches('/This value should not be blank/'); $validationProcessor->preProcess('my_wrong_fixture', $group); } }