CocurSlugifyBundleTest.php 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. <?php
  2. /**
  3. * This file is part of cocur/slugify.
  4. *
  5. * (c) Florian Eckerstorfer <florian@eckerstorfer.co>
  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 Cocur\Slugify\Bridge\Symfony;
  11. use Cocur\Slugify\Bridge\Symfony\CocurSlugifyBundle;
  12. /**
  13. * CocurSlugifyBundleTest
  14. *
  15. * @category test
  16. * @package cocur/slugify
  17. * @subpackage bridge
  18. * @author Florian Eckerstorfer <florian@eckerstorfer.co>
  19. * @copyright 2012-2014 Florian Eckerstorfer
  20. * @license http://www.opensource.org/licenses/MIT The MIT License
  21. * @group unit
  22. */
  23. class CocurSlugifyBundleTest extends \PHPUnit_Framework_TestCase
  24. {
  25. public function setUp()
  26. {
  27. $this->bundle = new CocurSlugifyBundle();
  28. }
  29. /**
  30. * @test
  31. * @covers Cocur\Slugify\Bridge\Symfony\CocurSlugifyBundle::build()
  32. */
  33. public function build()
  34. {
  35. $container = $this->getMock(
  36. 'Symfony\Component\DependencyInjection\ContainerBuilder',
  37. array('registerExtension')
  38. );
  39. $container->expects($this->once())
  40. ->method('registerExtension')
  41. ->with($this->isInstanceOf('Cocur\Slugify\Bridge\Symfony\CocurSlugifyExtension'));
  42. $this->bundle->build($container);
  43. }
  44. }