Ejemplo n.º 1
0
 public function testInjectKernelContainerToCommand()
 {
     $container = \Mockery::mock('Symfony\\Component\\DependencyInjection\\ContainerInterface');
     $this->kernel->shouldReceive('getContainer')->andReturn($container);
     $command = new ContainerAwareCommand();
     $application = new Application($this->kernel);
     $application->add($command);
     static::assertSame($container, $command->getContainer());
 }
Ejemplo n.º 2
0
 /**
  * Constructor.
  *
  * @param string $environment
  * @param bool   $debug
  */
 public function __construct($environment = 'test', $debug = false)
 {
     parent::__construct($environment, $debug);
 }
Ejemplo n.º 3
0
 public function testContainerIsAvailableAfterBoot()
 {
     $this->kernel->boot();
     static::assertInstanceOf('Symfony\\Component\\DependencyInjection\\ContainerInterface', $this->kernel->getContainer());
 }