Skip to content

Commit

Permalink
Merge pull request #1 from crosslend/master
Browse files Browse the repository at this point in the history
Fixed DI issue
  • Loading branch information
leberknecht authored Jun 15, 2016
2 parents a60f605 + c8e2a7c commit bed3e77
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions Command/GenerateServiceTestCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,9 @@ public function configure()
->setDescription('Generates a base php-unit file with mocked services');
}

public function setContainer(ContainerInterface $container = null)
protected function injectDependencies()
{
parent::setContainer($container);
$this->testGeneratorService = $container->get('tps.test_generator');
$this->testGeneratorService = $this->getContainer->get('tps.test_generator');
}

/**
Expand All @@ -50,6 +49,8 @@ public function setContainer(ContainerInterface $container = null)
*/
protected function execute(InputInterface $input, OutputInterface $output)
{
$this->injectDependencies();

$this->output = $output;
$this->input = $input;

Expand Down

0 comments on commit bed3e77

Please sign in to comment.