示例#1
0
文件: SiteTest.php 项目: Nenuial/Yrch
 public function testSetTranslatableLocale()
 {
     $this->site->setTranslatableLocale('de');
     $this->assertAttributeEquals('de', 'locale', $this->site);
 }
示例#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;
 }