Exemple #1
0
 public function testLocales()
 {
     $this->lugLocaleContext->expects($this->once())->method('getLocales')->will($this->returnValue($locales = ['FR_fr']));
     $this->assertSame($locales, $this->localeContext->getLocales());
 }
Exemple #2
0
 /**
  * @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();
 }