-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
remove unnecessary second definition for service 'asm_translation_loa…
…der.translation_manager', add dependency injection extension test
- Loading branch information
Showing
3 changed files
with
44 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
43 changes: 43 additions & 0 deletions
43
Tests/DependencyInjection/AsmTranslatioLoaderExtensionTest.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
<?php | ||
|
||
/* | ||
* This file is part of the AsmTranslationLoaderBundle package. | ||
* | ||
* (c) Marc Aschmann <maschmann@gmail.com> | ||
* | ||
* For the full copyright and license information, please view the LICENSE | ||
* file that was distributed with this source code. | ||
*/ | ||
|
||
namespace Asm\TranslationLoaderBundle\Tests\DependencyInjection; | ||
|
||
use Asm\TranslationLoaderBundle\DependencyInjection\AsmTranslationLoaderExtension; | ||
use Symfony\Component\DependencyInjection\ContainerBuilder; | ||
|
||
class AsmTranslatioLoaderExtensionTest extends \PHPUnit_Framework_TestCase | ||
{ | ||
/** | ||
* @var AsmTranslationLoaderExtension | ||
*/ | ||
private $extension; | ||
|
||
protected function setUp() | ||
{ | ||
$this->extension = new AsmTranslationLoaderExtension(); | ||
} | ||
|
||
public function testEmptyConfiguration() | ||
{ | ||
$container = new ContainerBuilder(); | ||
$this->extension->load(array(), $container); | ||
|
||
$this->assertTrue($container->hasDefinition('asm_translation_loader.translation_manager')); | ||
|
||
// ensures that the translation manager service is injected into the | ||
// database translation loader service | ||
$this->assertEquals( | ||
'asm_translation_loader.translation_manager', | ||
$container->getDefinition('translation.loader.db')->getArgument(0) | ||
); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters