承接 craue/translations-tests 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

craue/translations-tests

最新稳定版本:1.2.1

Composer 安装命令:

composer require --dev craue/translations-tests

包简介

Common code for testing translations in your Symfony project.

README 文档

README

Build Status

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

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 1
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2020-05-07