Example #1
0
 /**
  * @depends testCreate
  */
 public function testSetValue(ConfigModel $config)
 {
     $event = new ConfigUpdateEvent($config->getId());
     $event->setValue('baz')->setDispatcher($this->dispatcher);
     $action = new Config();
     $action->setValue($event);
     $updatedConfig = $event->getConfig();
     $this->assertInstanceOf('Thelia\\Model\\Config', $updatedConfig);
     $this->assertEquals($config->getName(), $updatedConfig->getName());
     $this->assertEquals('baz', $updatedConfig->getValue());
     $this->assertEquals($config->getLocale(), $updatedConfig->getLocale());
     $this->assertEquals($config->getTitle(), $updatedConfig->getTitle());
     $this->assertEquals($config->getHidden(), $updatedConfig->getHidden());
     $this->assertEquals($config->getSecured(), $updatedConfig->getSecured());
     return $updatedConfig;
 }
 /**
  * @param Config $object
  * @return string
  */
 protected function getObjectLabel($object)
 {
     return $object->getName();
 }