Something is wrong. All my tests fail except those ones that are for the
base module that sets up the translator.
The problem is the same:
Zend\Mvc\Exception\BadMethodCallException: Unable to call method
"setLocale"; does not exist in translator


So I have these in my base modules onBootstrap:
$translator = $e->getApplication()->getServiceManager()->get('translator');
$translator->setLocale('en');

This is working if I visit the site in a browser however when I run the
unit tests it does not.




On 12 March 2014 22:00, Ralf Eggert <[email protected]> wrote:

> Hi Matthew,
>
> > As such, the above example would not have worked at any time in the 2.2
> series.
>
> Sorry, my mistake. The code snippet had the wrong use statement. It
> should have been:
>
> use Zend\Mvc\I18n\Translator;
>
> Thanks and best regards,
>
> Ralf
>
> --
> List: [email protected]
> Info: http://framework.zend.com/archives
> Unsubscribe: [email protected]
>
>
>

Reply via email to