KernelTest.php 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  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\Component\HttpKernel;
  11. use Symfony\Component\HttpKernel\Kernel;
  12. use Symfony\Component\DependencyInjection\Loader\LoaderInterface;
  13. class KernelTest extends \PHPUnit_Framework_TestCase
  14. {
  15. public function testGetSafeName()
  16. {
  17. $kernel = new KernelForTest('dev', true, '-foo-');
  18. $this->assertEquals('foo', $kernel->getSafeName());
  19. }
  20. }
  21. class KernelForTest extends Kernel
  22. {
  23. public function __construct($environment, $debug, $name)
  24. {
  25. parent::__construct($environment, $debug);
  26. $this->name = $name;
  27. }
  28. public function registerRootDir()
  29. {
  30. }
  31. public function registerBundles()
  32. {
  33. }
  34. public function registerBundleDirs()
  35. {
  36. }
  37. public function registerContainerConfiguration(LoaderInterface $loader)
  38. {
  39. }
  40. }