You are here

public function ValidatorBuilderTest::testLegacyDefaultApiVersion in Plug 7

@group legacy

File

lib/Symfony/validator/Symfony/Component/Validator/Tests/ValidatorBuilderTest.php, line 116

Class

ValidatorBuilderTest

Namespace

Symfony\Component\Validator\Tests

Code

public function testLegacyDefaultApiVersion() {
  $this
    ->iniSet('error_reporting', -1 & ~E_USER_DEPRECATED);
  if (PHP_VERSION_ID < 50309) {

    // Old implementation on PHP < 5.3.9
    $this
      ->assertInstanceOf('Symfony\\Component\\Validator\\Validator', $this->builder
      ->getValidator());
  }
  else {

    // Legacy compatible implementation on PHP >= 5.3.9
    $this
      ->assertInstanceOf('Symfony\\Component\\Validator\\Validator\\LegacyValidator', $this->builder
      ->getValidator());
  }
}