public function testLocales() { $this->lugLocaleContext->expects($this->once())->method('getLocales')->will($this->returnValue($locales = ['FR_fr'])); $this->assertSame($locales, $this->localeContext->getLocales()); }
/** * @expectedException \Lug\Bundle\GridBundle\Exception\LocaleNotFoundException * @expectedExceptionMessage The locale could not be found. */ public function testLocaleMissing() { $this->lugContext->expects($this->once())->method('getLocales')->will($this->returnValue([])); $this->context->getLocale(); }