DumperCollectionTest.php 748 B

1234567891011121314151617181920212223242526272829303132333435
  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\Routing\Tests\Matcher\Dumper;
  11. use PHPUnit\Framework\TestCase;
  12. use Symfony\Component\Routing\Matcher\Dumper\DumperCollection;
  13. class DumperCollectionTest extends TestCase
  14. {
  15. public function testGetRoot()
  16. {
  17. $a = new DumperCollection();
  18. $b = new DumperCollection();
  19. $a->add($b);
  20. $c = new DumperCollection();
  21. $b->add($c);
  22. $d = new DumperCollection();
  23. $c->add($d);
  24. $this->assertSame($a, $c->getRoot());
  25. }
  26. }