|
@@ 65-79 (lines=15) @@
|
| 62 |
|
$extension->load(array($config), $this->containerBuilder); |
| 63 |
|
} |
| 64 |
|
|
| 65 |
|
public function testJsExtractionPaths() |
| 66 |
|
{ |
| 67 |
|
$extension = new IncenteevTranslationCheckerExtension(); |
| 68 |
|
|
| 69 |
|
$config = array('extraction' => array('js' => array('paths' => array('%kernel.project_dir%/web/js')))); |
| 70 |
|
|
| 71 |
|
$extension->load(array($config), $this->containerBuilder); |
| 72 |
|
|
| 73 |
|
$this->assertTrue($this->containerBuilder->hasDefinition('incenteev_translation_checker.extractor.js')); |
| 74 |
|
|
| 75 |
|
$def = $this->containerBuilder->getDefinition('incenteev_translation_checker.extractor.js'); |
| 76 |
|
|
| 77 |
|
$this->assertEquals(array('%kernel.project_dir%/web/js'), $def->getArgument(0)); |
| 78 |
|
$this->assertEquals('messages', $def->getArgument(1)); |
| 79 |
|
} |
| 80 |
|
|
| 81 |
|
public function testJsExtractionDomain() |
| 82 |
|
{ |
|
@@ 81-95 (lines=15) @@
|
| 78 |
|
$this->assertEquals('messages', $def->getArgument(1)); |
| 79 |
|
} |
| 80 |
|
|
| 81 |
|
public function testJsExtractionDomain() |
| 82 |
|
{ |
| 83 |
|
$extension = new IncenteevTranslationCheckerExtension(); |
| 84 |
|
|
| 85 |
|
$config = array('extraction' => array('js' => array('paths' => array('%kernel.project_dir%/web/js'), 'default_domain' => 'js_messages'))); |
| 86 |
|
|
| 87 |
|
$extension->load(array($config), $this->containerBuilder); |
| 88 |
|
|
| 89 |
|
$this->assertTrue($this->containerBuilder->hasDefinition('incenteev_translation_checker.extractor.js')); |
| 90 |
|
|
| 91 |
|
$def = $this->containerBuilder->getDefinition('incenteev_translation_checker.extractor.js'); |
| 92 |
|
|
| 93 |
|
$this->assertEquals(array('%kernel.project_dir%/web/js'), $def->getArgument(0)); |
| 94 |
|
$this->assertEquals('js_messages', $def->getArgument(1)); |
| 95 |
|
} |
| 96 |
|
|
| 97 |
|
/** |
| 98 |
|
* @param mixed $value |