Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[Translation] fix test case name #40470

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 15, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -1723,7 +1723,7 @@ protected function createContainerFromFile($file, $data = [], $resetCompilerPass
$container->getCompilerPassConfig()->setAfterRemovingPasses([]);
}
$container->getCompilerPassConfig()->setBeforeOptimizationPasses([new LoggerPass()]);
$container->getCompilerPassConfig()->setBeforeRemovingPasses([new AddConstraintValidatorsPass(), new TranslatorPass('translator.default', 'translation.reader')]);
$container->getCompilerPassConfig()->setBeforeRemovingPasses([new AddConstraintValidatorsPass(), new TranslatorPass()]);
$container->getCompilerPassConfig()->setAfterRemovingPasses([new AddAnnotationsCachedReaderPass()]);

if (!$compile) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
use Symfony\Component\DependencyInjection\Reference;
use Symfony\Component\Translation\DependencyInjection\TranslatorPass;

class TranslationPassTest extends TestCase
class TranslatorPassTest extends TestCase
{
public function testValidCollector()
{
Expand All @@ -35,7 +35,7 @@ public function testValidCollector()
$container->setDefinition('translation.reader', $reader);
$container->setDefinition('translation.xliff_loader', $loader);

$pass = new TranslatorPass('translator.default', 'translation.reader');
$pass = new TranslatorPass();
$pass->process($container);

$expectedReader = (new Definition())
Expand Down Expand Up @@ -72,7 +72,7 @@ public function testValidCommandsViewPathsArgument()
;
$container->setParameter('twig.default_path', 'templates');

$pass = new TranslatorPass('translator.default');
$pass = new TranslatorPass();
$pass->process($container);

$expectedViewPaths = ['other/templates', 'tpl'];
Expand Down Expand Up @@ -113,7 +113,7 @@ public function testCommandsViewPathsArgumentsAreIgnoredWithOldServiceDefinition
;
$container->setParameter('twig.default_path', 'templates');

$pass = new TranslatorPass('translator.default');
$pass = new TranslatorPass();
$pass->process($container);

$this->assertSame('templates', $debugCommand->getArgument(4));
Expand Down