Skip to content

Commit

Permalink
Use object manager to pass unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Ethan3600 committed Jul 15, 2018
1 parent ac57387 commit 19c3f3a
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions lib/internal/Magento/Framework/App/Bootstrap.php
Original file line number Diff line number Diff line change
Expand Up @@ -107,13 +107,6 @@ class Bootstrap
*/
private $factory;

/**
* Logger
*
* @var LoggerInterface
*/
private $logger;

/**
* Static method so that client code does not have to create Object Manager Factory every time Bootstrap is called
*
Expand Down Expand Up @@ -214,7 +207,6 @@ public function __construct(ObjectManagerFactory $factory, $rootDir, array $init
$this->rootDir = $rootDir;
$this->server = $initParams;
$this->objectManager = $this->factory->create($this->server);
$this->logger = $this->objectManager->create(LoggerInterface::class);
}

/**
Expand Down Expand Up @@ -267,7 +259,7 @@ public function run(AppInterface $application)
\Magento\Framework\Profiler::stop('magento');
} catch (\Exception $e) {
\Magento\Framework\Profiler::stop('magento');
$this->logger->error($e->getMessage());
$this->objectManager->get(LoggerInterface::class)->error($e);
if (!$application->catchException($this, $e)) {
throw $e;
}
Expand Down

0 comments on commit 19c3f3a

Please sign in to comment.