Révision 59ae487e
Ajouté par Assos Assos il y a presque 7 ans
drupal7/sites/all/modules/ldap/ldap_authorization/tests/Og2Tests.test | ||
---|---|---|
285 | 285 |
*/ |
286 | 286 |
|
287 | 287 |
list($students_group, $group_entity_id) = ldap_authorization_og2_get_group_from_name('node', 'students'); |
288 |
//debug("ldap_authorization_og2_get_group_from_name: students_group"); debug($students_group); |
|
289 | 288 |
$this->assertTrue($students_group->title == 'students', 'ldap_authorization_og2_get_group_from_name() function works', $this->ldapTestId); |
290 | 289 |
|
291 | 290 |
$test = ldap_authorization_og2_has_role($this->groupType, $group_nids['gryffindor'], $web_user->uid, OG_ADMINISTRATOR_ROLE); |
... | ... | |
338 | 337 |
|
339 | 338 |
list($new_authorizations, $notifications) = ldap_authorizations_user_authorizations($hpotter, 'query'); // just see if the correct ones are derived. |
340 | 339 |
$groups1 = $new_authorizations['og_group']; |
341 |
// debug('ldap_authorizations_user_authorizations disabled:'); debug($new_authorizations); debug($notifications); |
|
342 | 340 |
$this->assertTrue( |
343 | 341 |
count($new_authorizations['og_group']) == 0, |
344 | 342 |
'disabled consumer configuration disallows authorizations.', |
... | ... | |
350 | 348 |
$this->consumerAdminConf['og_group']->status = 1; |
351 | 349 |
$this->consumerAdminConf['og_group']->save(); |
352 | 350 |
list($new_authorizations, $notifications) = ldap_authorizations_user_authorizations($hpotter, 'query', 'og_group'); // just see if the correct ones are derived. |
353 |
//debug('ldap_authorizations_user_authorizations enabled: '); debug($new_authorizations); debug($notifications); |
|
354 | 351 |
|
355 | 352 |
$correct_groups = !empty($new_authorizations['og_group'][$consumer_ids['students'][OG_AUTHENTICATED_ROLE]]) && |
356 | 353 |
!empty($new_authorizations['og_group'][$consumer_ids['gryffindor'][OG_AUTHENTICATED_ROLE]]); |
Formats disponibles : Unified diff
Weekly update of contrib modules