You are here

protected function PMPAPIPermissionsWebTestCase::createTestGroup in Public Media Platform API Integration 7

1 call to PMPAPIPermissionsWebTestCase::createTestGroup()
PMPAPIPermissionsWebTestCase::setUp in pmpapi_permissions/tests/pmpapi_permissions.test
Sets up the test environment.

File

pmpapi_permissions/tests/pmpapi_permissions.test, line 201

Class

PMPAPIPermissionsWebTestCase
Tests the functionality of the PMPAPI permissions module.

Code

protected function createTestGroup() {
  $values = array(
    'profile' => 'group',
    'attributes' => array(
      'title' => variable_get('site_name') . ' SimpleTest test group: ' . date('G:i:s'),
    ),
  );
  $item = new stdClass();
  $item->href = variable_get('pmpapi_base_url') . '/docs/' . $this->testOrgGUID;
  $values['items'][] = $item;
  $group = pmpapi_send($values);
  $this
    ->assertTrue(is_object($group), 'Test group successfully created.');
  $this->testGroupGUID = !empty($group->attributes->guid) ? $group->attributes->guid : '';
}