diff options
author | Nicolas LÅ“uillet <nicolas.loeuillet@gmail.com> | 2013-08-04 17:50:34 +0200 |
---|---|---|
committer | Nicolas LÅ“uillet <nicolas.loeuillet@gmail.com> | 2013-08-04 17:50:34 +0200 |
commit | 46b77928f746a4231d064774b5b67fd892c7ce86 (patch) | |
tree | e3ea690b3f0def1744ddae758923cf92171ef985 /vendor/symfony/form/Symfony/Component/Form/Tests/Extension/Validator/Util/ServerParamsTest.php | |
parent | 68abd9c71b1d2f7bb2e9d21819584d1d15005b25 (diff) | |
download | wallabag-46b77928f746a4231d064774b5b67fd892c7ce86.tar.gz wallabag-46b77928f746a4231d064774b5b67fd892c7ce86.tar.zst wallabag-46b77928f746a4231d064774b5b67fd892c7ce86.zip |
rm vendor
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.php | 46 |
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 | |||
12 | namespace Symfony\Component\Form\Tests\Extension\Validator\Util; | ||
13 | |||
14 | class 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 | } | ||