/** * idsites = all => apply access to all websites with admin access */ public function testSetUserAccessIdsitesIsAll() { $this->api->addUser("gegg4564eqgeqag", "geqgegagae", "*****@*****.**", "alias"); FakeAccess::$superUser = false; $this->api->setUserAccess("gegg4564eqgeqag", "view", "all"); FakeAccess::$superUser = true; $access = $this->api->getSitesAccessFromUser("gegg4564eqgeqag"); $access = $this->_flatten($access); FakeAccess::$superUser = false; $this->assertEquals(array_keys($access), FakeAccess::getSitesIdWithAdminAccess()); // we want to test the case for which we have actually set some rights // if this is not OK then change the setUp method and add some admin rights for some websites $this->assertGreaterThan(0, count(array_keys($access))); }