Ejemplo n.º 1
0
 /**
  * @dataProvider localeDataProvider
  *
  * @param string|null $defaultLocale
  * @param int|null    $id
  * @param bool        $expectedRefresh
  */
 public function testShouldPresetDefaultLocale($defaultLocale, $id, $expectedRefresh)
 {
     $this->form->expects($this->once())->method('setData')->with($this->entity);
     $this->manager->expects($expectedRefresh ? $this->once() : $this->never())->method('refresh')->with($this->entity);
     $this->setEntityId($id);
     $this->handler->setDefaultLocale($defaultLocale);
     $this->handler->process($this->entity);
     $this->assertSame($defaultLocale, $this->entity->getLocale());
 }