craue/translations-tests
最新稳定版本:1.2.1
Composer 安装命令:
composer require --dev craue/translations-tests
包简介
Common code for testing translations in your Symfony project.
README 文档
README
This repository contains just some common code for testing translations in your Symfony project.
Installation
Let Composer download and install the bundle by running
composer require --dev craue/translations-tests
in a shell.
Usage
// src/app/Tests/TranslationsTest.php namespace Application\Tests; use Craue\TranslationsTests\YamlTranslationsTest; /** * @group unit */ class TranslationsTest extends YamlTranslationsTest { // only add this method to override the default implementation returning "en" protected function defineDefaultLocale() : string { return 'de'; } // specify all locations with translation files protected function defineTranslationFiles() : array { return array_merge( glob(__DIR__ . '/../../Resources/translations/*.yml'), glob(__DIR__ . '/../../Resources/*Bundle/translations/*.yml'), glob(__DIR__ . '/../../../src/*/*Bundle/Resources/translations/*.yml') ); } }
统计信息
- 总下载量: 3.69k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 1
- 依赖项目数: 5
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2020-05-07