BundleTest.php 916 B

123456789101112131415161718192021222324252627282930313233
  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\Bundle;
  11. class BundleTest extends \PHPUnit_Framework_TestCase
  12. {
  13. public function testGetNormalizedPathReturnsANormalizedPath()
  14. {
  15. $bundle = $this
  16. ->getMockBuilder('Symfony\Component\HttpKernel\Bundle\Bundle')
  17. ->setMethods(array('getPath'))
  18. ->disableOriginalConstructor()
  19. ->getMockForAbstractClass()
  20. ;
  21. $bundle
  22. ->expects($this->once())
  23. ->method('getPath')
  24. ->will($this->returnValue('path\\to\\foo\\bar'))
  25. ;
  26. $this->assertEquals('path/to/foo/bar', $bundle->getNormalizedPath());
  27. }
  28. }