You are here

public function FileTest::testMaxSizeCannotBeSetToInvalidValueAfterInitialization in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/symfony/validator/Tests/Constraints/FileTest.php \Symfony\Component\Validator\Tests\Constraints\FileTest::testMaxSizeCannotBeSetToInvalidValueAfterInitialization()

@dataProvider provideInvalidSizes

Parameters

int|string $maxSize:

File

vendor/symfony/validator/Tests/Constraints/FileTest.php, line 66

Class

FileTest

Namespace

Symfony\Component\Validator\Tests\Constraints

Code

public function testMaxSizeCannotBeSetToInvalidValueAfterInitialization($maxSize) {
  $file = new File(array(
    'maxSize' => 1000,
  ));
  try {
    $file->maxSize = $maxSize;
  } catch (ConstraintDefinitionException $e) {
  }
  $this
    ->assertSame(1000, $file->maxSize);
}