for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Tests\GBProd\DoctrineSpecificationBundle\DependencyInjection;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use GBProd\DoctrineSpecificationBundle\DependencyInjection\DoctrineSpecificationExtension;
use GBProd\DoctrineSpecification\Handler;
use GBProd\DoctrineSpecification\Registry;
/**
* Tests for DoctrineSpecificationExtension
*
* @author gbprod <[email protected]>
*/
class DoctrineSpecificationExtensionTest extends \PHPUnit_Framework_TestCase
{
private $extension;
private $container;
protected function setUp()
$this->extension = new DoctrineSpecificationExtension();
$this->container = new ContainerBuilder();
$this->container->registerExtension($this->extension);
$this->container->loadFromExtension($this->extension->getAlias());
$this->container->compile();
}
public function testLoadHasServices()
$this->assertTrue(
$this->container->has('gbprod.doctrine_specification_registry')
);
$this->container->has('gbprod.doctrine_specification_handler')
public function testLoadRegistry()
$registry = $this->container->get('gbprod.doctrine_specification_registry');
$this->assertInstanceOf(Registry::class, $registry);
public function testLoadHandler()
$handler = $this->container->get('gbprod.doctrine_specification_handler');
$this->assertInstanceOf(Handler::class, $handler);