validator->validate($collection, $this->getConstraint()); $this->assertNoViolation(); } protected function createValidator() { $personRender = $this->prophesize(PersonRenderInterface::class); $personRender->renderString(Argument::is(Person::class), [])->willReturn('person'); $thirdPartyRender = $this->prophesize(ThirdPartyRender::class); $thirdPartyRender->renderString(Argument::is(ThirdParty::class), [])->willReturn('thirdparty'); return new ParticipationOverlapValidator($personRender->reveal(), $thirdPartyRender->reveal()); } }