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

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

public it__try_to_translate_the_given_category ( Compiler $compiler, Illuminate\Contracts\Config\Repository $config )
$compiler Fenos\Notifynder\Translator\Compiler
$config Illuminate\Contracts\Config\Repository
    public function it__try_to_translate_the_given_category(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->shouldThrow(NotificationTranslationNotFoundException::class)->during('translate', ['it', 'not existing']);
    }