SonataAdminExtensionTest.php 1.0 KB

123456789101112131415161718192021222324252627282930313233
  1. <?php
  2. /*
  3. * This file is part of the Sonata Project package.
  4. *
  5. * (c) Thomas Rabaix <thomas.rabaix@sonata-project.org>
  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 Sonata\AdminBundle\Tests\DependencyInjection;
  11. use Matthias\SymfonyDependencyInjectionTest\PhpUnit\AbstractExtensionTestCase;
  12. use Sonata\AdminBundle\DependencyInjection\SonataAdminExtension;
  13. class SonataAdminExtensionTest extends AbstractExtensionTestCase
  14. {
  15. public function testLoadsExporterServiceDefinitionWhenExporterBundleIsRegistered()
  16. {
  17. $this->container->setParameter('kernel.bundles', array('SonataExporterBundle' => 'whatever'));
  18. $this->load();
  19. $this->assertContainerBuilderHasService(
  20. 'sonata.admin.admin_exporter',
  21. 'Sonata\AdminBundle\Bridge\Exporter\AdminExporter'
  22. );
  23. }
  24. protected function getContainerExtensions()
  25. {
  26. return array(new SonataAdminExtension());
  27. }
  28. }