You are here

protected function AbstractConstraintValidatorTest::setUp in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/symfony/validator/Tests/Constraints/AbstractConstraintValidatorTest.php \Symfony\Component\Validator\Tests\Constraints\AbstractConstraintValidatorTest::setUp()
2 calls to AbstractConstraintValidatorTest::setUp()
FileValidatorTest::setUp in vendor/symfony/validator/Tests/Constraints/FileValidatorTest.php
ImageValidatorTest::setUp in vendor/symfony/validator/Tests/Constraints/ImageValidatorTest.php
2 methods override AbstractConstraintValidatorTest::setUp()
FileValidatorTest::setUp in vendor/symfony/validator/Tests/Constraints/FileValidatorTest.php
ImageValidatorTest::setUp in vendor/symfony/validator/Tests/Constraints/ImageValidatorTest.php

File

vendor/symfony/validator/Tests/Constraints/AbstractConstraintValidatorTest.php, line 52

Class

AbstractConstraintValidatorTest
@since 2.5.3

Namespace

Symfony\Component\Validator\Tests\Constraints

Code

protected function setUp() {
  $this->group = 'MyGroup';
  $this->metadata = null;
  $this->object = null;
  $this->value = 'InvalidValue';
  $this->root = 'root';
  $this->propertyPath = 'property.path';

  // Initialize the context with some constraint so that we can
  // successfully build a violation.
  $this->constraint = new NotNull();
  $this->context = $this
    ->createContext();
  $this->validator = $this
    ->createValidator();
  $this->validator
    ->initialize($this->context);
  \Locale::setDefault('en');
  $this
    ->setDefaultTimezone('UTC');
}