Пример #1
0
 /**
  * @expectedException InvalidArgumentException
  */
 public function testSuperOwnerException()
 {
     $user = new User();
     $this->site->setSuperOwner($user);
     $this->site->removeOwner($user);
 }
Пример #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;
 }