Révision dd54aff9
Ajouté par Assos Assos il y a plus de 10 ans
htmltest/sites/all/modules/ldap/ldap_authorization/tests/Og2Tests.test | ||
---|---|---|
94 | 94 |
} |
95 | 95 |
|
96 | 96 |
} |
97 |
|
|
97 |
|
|
98 | 98 |
/** |
99 | 99 |
* get test data in convenient format, so tests are easier to read and write |
100 | 100 |
*/ |
... | ... | |
121 | 121 |
} |
122 | 122 |
return array($group_nodes, $group_nids, $group_entity_ids, $roles_by_name, $consumer_ids); |
123 | 123 |
} |
124 |
|
|
124 |
|
|
125 | 125 |
/** |
126 | 126 |
* just make sure install succeeds and |
127 | 127 |
*/ |
... | ... | |
159 | 159 |
$this->ldapTestId = $this->module_name . ': og2 functions'; |
160 | 160 |
list($group_nodes, $group_nids, $group_entity_ids, $roles_by_name, $consumer_ids) = $this->getTestData(TRUE); |
161 | 161 |
|
162 |
|
|
162 |
|
|
163 | 163 |
/** |
164 | 164 |
* II.0 basic granting tests to make sure og_role_grant, ldap_authorization_og_rid_from_role_name, |
165 | 165 |
* and ldap_authorization_og2_get_group functions work |
... | ... | |
220 | 220 |
$consumer_ids['faculty'][OG_ADMINISTRATOR_ROLE] => 'faculty admin', |
221 | 221 |
$consumer_ids['faculty']['dungeon-master'] => 'faculty dungeon master', |
222 | 222 |
); |
223 |
|
|
223 |
|
|
224 | 224 |
foreach ($should_haves as $consumer_id => $descriptor) { |
225 | 225 |
$this->assertTrue(ldap_authorization_og2_has_consumer_id($consumer_id, $web_user->uid), |
226 | 226 |
"LdapAuthorizationConsumerOG usersAuthorizations() for $descriptor - $consumer_id", $this->ldapTestId); |
... | ... | |
341 | 341 |
); |
342 | 342 |
|
343 | 343 |
list($group_nodes, $group_nids, $group_entity_ids, $roles_by_name, $consumer_ids) = $this->getTestData(TRUE); |
344 |
|
|
344 |
|
|
345 | 345 |
$this->consumerAdminConf['og_group']->status = 1; |
346 | 346 |
$this->consumerAdminConf['og_group']->save(); |
347 | 347 |
list($new_authorizations, $notifications) = ldap_authorizations_user_authorizations($hpotter, 'query', 'og_group'); // just see if the correct ones are derived. |
Formats disponibles : Unified diff
Weekly update of contrib modules