aboutsummaryrefslogtreecommitdiffhomepage
path: root/vendor/symfony/form/Symfony/Component/Form/Tests/Extension/Validator/Util/ServerParamsTest.php
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/symfony/form/Symfony/Component/Form/Tests/Extension/Validator/Util/ServerParamsTest.php')
-rw-r--r--vendor/symfony/form/Symfony/Component/Form/Tests/Extension/Validator/Util/ServerParamsTest.php46
1 files changed, 0 insertions, 46 deletions
diff --git a/vendor/symfony/form/Symfony/Component/Form/Tests/Extension/Validator/Util/ServerParamsTest.php b/vendor/symfony/form/Symfony/Component/Form/Tests/Extension/Validator/Util/ServerParamsTest.php
deleted file mode 100644
index 7ad5b771..00000000
--- a/vendor/symfony/form/Symfony/Component/Form/Tests/Extension/Validator/Util/ServerParamsTest.php
+++ /dev/null
@@ -1,46 +0,0 @@
1<?php
2
3/*
4 * This file is part of the Symfony package.
5 *
6 * (c) Fabien Potencier <fabien@symfony.com>
7 *
8 * For the full copyright and license information, please view the LICENSE
9 * file that was distributed with this source code.
10 */
11
12namespace Symfony\Component\Form\Tests\Extension\Validator\Util;
13
14class ServerParamsTest extends \PHPUnit_Framework_TestCase
15{
16 /** @dataProvider getGetPostMaxSizeTestData */
17 public function testGetPostMaxSize($size, $bytes)
18 {
19 $serverParams = $this->getMock('Symfony\Component\Form\Extension\Validator\Util\ServerParams', array('getNormalizedIniPostMaxSize'));
20 $serverParams
21 ->expects($this->any())
22 ->method('getNormalizedIniPostMaxSize')
23 ->will($this->returnValue(strtoupper($size)));
24
25 $this->assertEquals($bytes, $serverParams->getPostMaxSize());
26 }
27
28 public function getGetPostMaxSizeTestData()
29 {
30 return array(
31 array('2k', 2048),
32 array('2 k', 2048),
33 array('8m', 8 * 1024 * 1024),
34 array('+2 k', 2048),
35 array('+2???k', 2048),
36 array('0x10', 16),
37 array('0xf', 15),
38 array('010', 8),
39 array('+0x10 k', 16 * 1024),
40 array('1g', 1024 * 1024 * 1024),
41 array('-1', -1),
42 array('0', 0),
43 array('2mk', 2048), // the unit must be the last char, so in this case 'k', not 'm'
44 );
45 }
46}