Security update for Core, with self-updated composer
[yaffs-website] / vendor / symfony / var-dumper / Tests / Test / VarDumperTestTraitTest.php
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\VarDumper\Tests\Test;
13
14 use PHPUnit\Framework\TestCase;
15 use Symfony\Component\VarDumper\Test\VarDumperTestTrait;
16
17 class VarDumperTestTraitTest extends TestCase
18 {
19     use VarDumperTestTrait;
20
21     public function testItComparesLargeData()
22     {
23         $howMany = 700;
24         $data = array_fill_keys(range(0, $howMany), array('a', 'b', 'c', 'd'));
25
26         $expected = sprintf("array:%d [\n", $howMany + 1);
27         for ($i = 0; $i <= $howMany; ++$i) {
28             $expected .= <<<EODUMP
29   $i => array:4 [
30     0 => "a"
31     1 => "b"
32     2 => "c"
33     3 => "d"
34   ]\n
35 EODUMP;
36         }
37         $expected .= "]\n";
38
39         $this->assertDumpEquals($expected, $data);
40     }
41 }