spec\Fenos\Notifynder\Translator\TranslatorManagerSpec::it_translate_the_given_category_in_the_given_language PHP Метод

it_translate_the_given_category_in_the_given_language() публичный Метод

public it_translate_the_given_category_in_the_given_language ( Compiler $compiler, Illuminate\Contracts\Config\Repository $config )
$compiler Fenos\Notifynder\Translator\Compiler
$config Illuminate\Contracts\Config\Repository
    public function it_translate_the_given_category_in_the_given_language(Compiler $compiler, Repository $config)
    {
        $filePath = 'cached/file';
        $categoryToTranslate = 'categoryName';
        $translations = ['it' => [$categoryToTranslate => 'translation']];
        $compiler->getFilePath()->shouldBeCalled()->willReturn($filePath);
        $config->get('notifynder.translations')->shouldBeCalled()->willReturn($translations);
        $compiler->cacheFile($translations)->shouldBeCalled();
        $this->translate('it', $categoryToTranslate)->shouldReturn($translations['it'][$categoryToTranslate]);
    }