public function testCreate() { $event = new LangCreateEvent(); $event->setLocale('te_TE')->setTitle('test')->setCode('TES')->setDateFormat('Y-m-d')->setTimeFormat('H:i:s')->setDecimalSeparator(".")->setThousandsSeparator(" ")->setDecimals("2")->setDispatcher($this->dispatcher); $action = new Lang(); $action->create($event); $createdLang = $event->getLang(); $this->assertInstanceOf('Thelia\\Model\\Lang', $createdLang); $this->assertFalse($createdLang->isNew()); $this->assertEquals('te_TE', $createdLang->getLocale()); $this->assertEquals('test', $createdLang->getTitle()); $this->assertEquals('TES', $createdLang->getCode()); $this->assertEquals('Y-m-d', $createdLang->getDateFormat()); $this->assertEquals('H:i:s', $createdLang->getTimeFormat()); $this->assertEquals('.', $createdLang->getDecimalSeparator()); $this->assertEquals(' ', $createdLang->getThousandsSeparator()); $this->assertEquals('2', $createdLang->getDecimals()); $this->assertEquals('Y-m-d H:i:s', $createdLang->getDatetimeFormat()); return $createdLang; }