In a unit test, I need to set a locale before the test
use Mcamara\LaravelLocalization;
...
class FormatHelperTest extends \Codeception\TestCase\Test
{
protected function _before(){
LaravelLocalization::setLocale('el');
However,
PHP Fatal error: Class 'Mcamara\LaravelLocalization' not found in
/vagrant/project1/tests/unit/FormatHelperTest.php on line 40
How could I set the Locale via LaravelLocalization in a unit test ?
Edit
codeception.yml
actor: Tester
paths:
tests: tests
log: tests/_output
data: tests/_data
support: tests/_support
envs: tests/_envs
settings:
bootstrap: _bootstrap.php
colors: true
memory_limit: 1024M
extensions:
enabled:
- Codeception\Extension\RunFailed
modules:
config:
Db:
dsn: ''
user: ''
password: ''
dump: tests/_data/dump.sql
Edit
tests/_bootstrap.php
<?php
// This is global bootstrap for autoloading
test/unit/_boootstrap.php
<?php
// Here you can initialize variables that will be available to your tests