Exemplo n.º 1
0
 protected function createSettingsManager(array $configuration = array(), $serialization = 'php')
 {
     if (empty($configuration)) {
         $configuration = array('some_setting' => array('scope' => SettingsManagerInterface::SCOPE_ALL), 'some_setting2' => array('scope' => SettingsManagerInterface::SCOPE_ALL), 'some_global_setting' => array('scope' => SettingsManagerInterface::SCOPE_GLOBAL), 'some_user_setting' => array('scope' => SettingsManagerInterface::SCOPE_USER));
     }
     $serializer = SerializerFactory::create($serialization);
     return new SettingsManager($this->em, $serializer, $configuration);
 }
Exemplo n.º 2
0
 /**
  * @expectedException \Dmishh\SettingsBundle\Exception\UnknownSerializerException
  */
 public function testUnknownSerializer()
 {
     $serializer = SerializerFactory::create('unknown_serializer');
 }