Example #1
0
 public function testSetTranslatableLocale()
 {
     $this->site->setTranslatableLocale('de');
     $this->assertAttributeEquals('de', 'locale', $this->site);
 }
Example #2
0
 /**
  * Create a new site
  *
  * @param int $i
  * @param User $superOwner
  * @return Site
  */
 protected function createSite($i, User $superOwner)
 {
     $site = new Site();
     $site->setTranslatableLocale('en');
     $site->setUrl('http://' . $i . 'example.org');
     $site->setName('Site ' . $i);
     $site->setDescription('test site number ' . $i);
     $site->setLanguages(array('en', 'fr'));
     $site->setCountries(array('US', 'CA'));
     if (!($i % 4)) {
         $site->addToSelection();
     }
     $site->setSuperOwner($superOwner);
     return $site;
 }