Drupal investigation

VarDumperTestTraitRequire54.php 972B

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. <?php
  2. /*
  3. * This file is part of the Symfony package.
  4. *
  5. * (c) Fabien Potencier <fabien@symfony.com>
  6. *
  7. * For the full copyright and license information, please view the LICENSE
  8. * file that was distributed with this source code.
  9. */
  10. namespace Symfony\Component\VarDumper\Tests\Test;
  11. use Symfony\Component\VarDumper\Test\VarDumperTestCase;
  12. use Symfony\Component\VarDumper\Test\VarDumperTestTrait;
  13. class VarDumperTestTraitRequire54 extends VarDumperTestCase
  14. {
  15. use VarDumperTestTrait;
  16. public function testItComparesLargeData()
  17. {
  18. $howMany = 700;
  19. $data = array_fill_keys(range(0, $howMany), array('a', 'b', 'c', 'd'));
  20. $expected = sprintf("array:%d [\n", $howMany + 1);
  21. for ($i = 0; $i <= $howMany; ++$i) {
  22. $expected .= <<<EODUMP
  23. $i => array:4 [
  24. 0 => "a"
  25. 1 => "b"
  26. 2 => "c"
  27. 3 => "d"
  28. ]\n
  29. EODUMP;
  30. }
  31. $expected .= "]\n";
  32. $this->assertDumpEquals($expected, $data);
  33. }
  34. }