How to use a vendor class in a test unit test ? (set the Locale via LaravelLocalization in test )

In a unit test, I need to set a locale before the test

use McamaraLaravelLocalization;
...
class FormatHelperTest extends CodeceptionTestCaseTest
{

protected function _before(){
        LaravelLocalization::setLocale('el');

However,

PHP Fatal error:  Class 'McamaraLaravelLocalization' not found in
/vagrant/project1/tests/unit/FormatHelperTest.php on line 40

How could I set the Locale via LaravelLocalization in a unit test ?


Source: php

Leave a Reply