public function testCanSetLocale() { $trans = new Translator\Translator('arrayAdapter', array('one' => 'eins', 'two %1\\$s' => 'zwei %1\\$s'), 'de'); $trans->addTranslation(array('one' => 'uno', 'two %1\\$s' => 'duo %2\\$s'), 'it'); $trans->setLocale('de'); $this->helper->setTranslator($trans); $this->assertEquals('eins', $this->helper->direct('one')); $new = $this->helper->setLocale('it'); $this->assertTrue($new instanceof Helper\Translator); $this->assertEquals('it', $new->getLocale()); $this->assertEquals('uno', $this->helper->direct('one')); }