You are here

public function FileValidatorTest::provideMaxSizeNotExceededTests in Zircon Profile 8

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

File

vendor/symfony/validator/Tests/Constraints/FileValidatorTest.php, line 188

Class

FileValidatorTest

Namespace

Symfony\Component\Validator\Tests\Constraints

Code

public function provideMaxSizeNotExceededTests() {
  return array(
    // limit in bytes
    array(
      1000,
      1000,
    ),
    array(
      1000000,
      1000000,
    ),
    // limit in kB
    array(
      1000,
      '1k',
    ),
    array(
      1000000,
      '1000k',
    ),
    // limit in MB
    array(
      1000000,
      '1M',
    ),
    // limit in KiB
    array(
      1024,
      '1Ki',
    ),
    array(
      1048576,
      '1024Ki',
    ),
    // limit in MiB
    array(
      1048576,
      '1Mi',
    ),
  );
}