KernelTest.php 1017 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. <?php
  2. /*
  3. * This file is part of the Symfony package.
  4. *
  5. * (c) Fabien Potencier <fabien.potencier@symfony-project.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\Tests\Foundation;
  11. use Symfony\Foundation\Kernel;
  12. class KernelTest extends \PHPUnit_Framework_TestCase
  13. {
  14. public function testGetSafeName()
  15. {
  16. $kernel = new KernelForTest('dev', true, '-foo-');
  17. $this->assertEquals('foo', $kernel->getSafeName());
  18. }
  19. }
  20. class KernelForTest extends Kernel
  21. {
  22. public function __construct($environment, $debug, $name)
  23. {
  24. parent::__construct($environment, $debug);
  25. $this->name = $name;
  26. }
  27. public function registerRootDir()
  28. {
  29. }
  30. public function registerBundles()
  31. {
  32. }
  33. public function registerBundleDirs()
  34. {
  35. }
  36. public function registerContainerConfiguration()
  37. {
  38. }
  39. public function registerRoutes()
  40. {
  41. }
  42. }