Skip to content

Commit

Permalink
update doctrine-manager-builder requirement
Browse files Browse the repository at this point in the history
  • Loading branch information
juliangut committed Oct 8, 2017
1 parent ff569d0 commit 2ae35db
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 13 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
"require": {
"php": "^5.6|^7.0",
"slim/slim": "^3.0",
"juliangut/doctrine-manager-builder": "^1.4"
"juliangut/doctrine-manager-builder": "^1.7"
},
"require-dev": {
"brainmaestro/composer-git-hooks": "^2.1",
Expand Down
4 changes: 2 additions & 2 deletions src/ManagerBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -224,9 +224,9 @@ public function getCLIApplication()
$application->setCatchExceptions(true);

foreach ($this->builders as $builder) {
$helperSet = $builder->getConsoleHelperSet();

foreach ($builder->getConsoleCommands() as $command) {
$helperSet = $command->getHelperSet();

$application->add($command)->setHelperSet($helperSet);
}
}
Expand Down
20 changes: 10 additions & 10 deletions tests/Doctrine/ManagerBuilderTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ class ManagerBuilderTest extends \PHPUnit_Framework_TestCase
public function testSingleManagers()
{
$settings = [
'entity_manager' => [
ManagerBuilder::DEFAULT_RELATIONAL_MANAGER_KEY => [
'connection' => [
'driver' => 'pdo_sqlite',
'memory' => true,
Expand All @@ -36,7 +36,7 @@ public function testSingleManagers()
],
],
],
'mongodb_document_manager' => [
ManagerBuilder::DEFAULT_MONGODB_MANAGER_KEY => [
'connection' => [
'server' => 'mongodb://localhost:27017',
'options' => ['connect' => false],
Expand All @@ -48,7 +48,7 @@ public function testSingleManagers()
],
],
],
'couchdb_document_manager' => [
ManagerBuilder::DEFAULT_COUCHDB_MANAGER_KEY => [
'connection' => [
'host' => 'localhost',
'dbname' => 'doctrine',
Expand Down Expand Up @@ -85,7 +85,7 @@ public function testSingleManagers()
public function testDuplicatedNamedManager()
{
$settings = [
'entity_manager' => [
ManagerBuilder::DEFAULT_RELATIONAL_MANAGER_KEY => [
'managerOne' => [
'connection' => [
'driver' => 'pdo_sqlite',
Expand All @@ -99,7 +99,7 @@ public function testDuplicatedNamedManager()
],
],
],
'mongodb_document_manager' => [
ManagerBuilder::DEFAULT_MONGODB_MANAGER_KEY => [
'managerOne' => [
'connection' => [
'server' => 'mongodb://localhost:27017',
Expand Down Expand Up @@ -127,7 +127,7 @@ public function testNoRegisteredManager()
self::assertCount(0, (new ManagerBuilder())->getManagers());

$settings = [
'entity_manager' => [
ManagerBuilder::DEFAULT_RELATIONAL_MANAGER_KEY => [
'connection' => [
'driver' => 'pdo_sqlite',
'memory' => true,
Expand Down Expand Up @@ -163,7 +163,7 @@ public function testUnnamedBuilder()
public function testCLIApplication()
{
$settings = [
'entity_manager' => [
ManagerBuilder::DEFAULT_RELATIONAL_MANAGER_KEY => [
'managerOne' => [
'connection' => [
'driver' => 'pdo_sqlite',
Expand All @@ -177,7 +177,7 @@ public function testCLIApplication()
],
],
],
'mongodb_document_manager' => [
ManagerBuilder::DEFAULT_MONGODB_MANAGER_KEY => [
'managerTwo' => [
'connection' => [
'server' => 'mongodb://localhost:27017',
Expand All @@ -197,7 +197,7 @@ public function testCLIApplication()

$application = $managerBuilder->getCLIApplication();

self::assertTrue($application->has('managerOne:dbal:run-sql'));
self::assertTrue($application->has('managerTwo:odm:query'));
self::assertTrue($application->has('dbal:managerOne:run-sql'));
self::assertTrue($application->has('odm:managerTwo:query'));
}
}

0 comments on commit 2ae35db

Please sign in to comment.