Skip to content

Commit

Permalink
Added missing CrudManagerFactory DI definitionL
Browse files Browse the repository at this point in the history
  • Loading branch information
Budry committed Feb 4, 2015
1 parent 6b7f286 commit a7502e0
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/DI/DoctrineExtension.php
Expand Up @@ -35,6 +35,7 @@ public function loadConfiguration()
$config = $this->getConfig($this->defaultConfig);
$this->processForms($config['forms']);
$this->processConverter();
$this->processManagers();
if ($config['identity']) {
$this->processIdentity();
}
Expand Down Expand Up @@ -64,4 +65,11 @@ private function processConverter()
$builder->addDefinition($this->prefix('converter'))
->setClass('Kappa\Doctrine\Converters\Converter');
}

private function processManagers()
{
$builder = $this->getContainerBuilder();
$builder->addDefinition($this->prefix('crudManagerFactory'))
->setClass('Kappa\Doctrine\Managers\CrudManagerFactory');
}
}
Expand Up @@ -44,6 +44,12 @@ class DoctrineExtensionTest extends TestCase
$type = 'Kappa\Doctrine\Forms\FormItemsCreator';
Assert::type($type, $this->container->getByType($type));
}

public function testCrudManagerFactory()
{
$type = 'Kappa\Doctrine\Managers\CrudManagerFactory';
Assert::type($type, $this->container->getByType($type));
}
}

\run(new DoctrineExtensionTest(getContainer()));

0 comments on commit a7502e0

Please sign in to comment.