<?php

namespace SLLH\IsoCodesValidatorBundle\Tests\DependencyInjection\Compiler;

use Matthias\SymfonyDependencyInjectionTest\PhpUnit\AbstractCompilerPassTestCase;
use SLLH\IsoCodesValidatorBundle\DependencyInjection\Compiler\TranslationPass;
use Symfony\Component\DependencyInjection\ContainerBuilder;

class TranslationPassTest extends AbstractCompilerPassTestCase
{
    protected function registerCompilerPass(ContainerBuilder $container)
    {
        $container->addCompilerPass(new TranslationPass());
    }
}

<?php

namespace SLLH\IsoCodesValidatorBundle\Tests\DependencyInjection\Compiler;

use Matthias\SymfonyDependencyInjectionTest\PhpUnit\AbstractCompilerPassTestCase;
use SLLH\IsoCodesValidatorBundle\DependencyInjection\Compiler\TranslationPass;
use Symfony\Component\DependencyInjection\ContainerBuilder;

class TranslationPassTest extends AbstractCompilerPassTestCase
{
    protected function registerCompilerPass(ContainerBuilder $container)
    {
        $container->addCompilerPass(new TranslationPass());
    }

    public function testWithTranslatorService()
    {
        $this->registerService('translator.default', 'Symfony\Bundle\FrameworkBundle\Translation\Translator');
        $this->compile();

        // TODO: Check if translations resources are correctly added to the translator service.
    }
}

Test TranslationPass compile with translator.default definition
Test TranslationPass compile with translator.default definition
