示例#1
0
 public function testDefaultLocale()
 {
     $site = new Site();
     $default = 'Some Default Locale';
     $expected = $default;
     $site->setDefaultLocale($default);
     $actual = $site->getDefaultLocale();
     $this->assertSame($expected, $actual);
 }
示例#2
0
 /**
  * {@inheritDoc}
  */
 public function load(ObjectManager $manager)
 {
     $site = new Site();
     $site->setName($this->container->getParameter('domain'));
     $site->setDescription('The default domain');
     $site->setDomain($this->container->getParameter('domain'));
     $site->setCookieDomain($this->container->getParameter('domain'));
     $site->setDefaultLocale($this->container->getParameter('locale'));
     $manager->persist($site);
     $manager->flush();
 }