sunaoka / phpunit-laravel-localization
Laravel Localization PHPUnit testing
v1.0.0
2025-06-10 05:36 UTC
Requires
- php: ^8.1
- laravel/framework: ^8.0 || ^9.0 || ^10.0 || ^11.0 || ^12.0
- nikic/php-parser: ^5.0
Requires (Dev)
- laravel/pint: ^1.20
- orchestra/testbench: ^6.47 || ^7.55 || ^8.36 || ^9.14 || ^10.4
- phpstan/phpstan: ^2.1
- phpstan/phpstan-strict-rules: ^2.0
- phpunit/phpunit: ^9.6 || ^10.5 || ^11.5 || ^12.1
README
Features
- Detect translation keys that are only used in “application” files.
- Detect translation keys defined only in “lang” files.
- Test to see if the translation keys for each language match, including the order
Installation
composer require --dev sunaoka/phpunit-laravel-localization
Usage
<?php // tests/Unit/LocalizationTest.php declare(strict_types=1); namespace Tests\Unit; use Sunaoka\PHPUnit\Laravel\Localization\LocalizationTesting; use Tests\TestCase; class LocalizationTest extends TestCase { use LocalizationTesting; }