function CompoundConstraintTestCase::createContext
2 calls to CompoundConstraintTestCase::createContext()
- CompoundConstraintTestCase::assertViolationsRaisedByCompound in vendor/
symfony/ validator/ Test/ CompoundConstraintTestCase.php - CompoundConstraintTestCase::setUp in vendor/
symfony/ validator/ Test/ CompoundConstraintTestCase.php - This method is called before each test.
File
-
vendor/
symfony/ validator/ Test/ CompoundConstraintTestCase.php, line 59
Class
- CompoundConstraintTestCase
- A test case to ease testing Compound Constraints.
Namespace
Symfony\Component\Validator\TestCode
protected function createContext(?ValidatorInterface $validator = null) : ExecutionContextInterface {
$translator = $this->createMock(TranslatorInterface::class);
$translator->expects($this->any())
->method('trans')
->willReturnArgument(0);
return new ExecutionContext($validator ?? $this->createValidator(), $this->root, $translator);
}