You are here

private function PatternsUserTestCase::testRoleDelete in Patterns 7.2

Same name and namespace in other branches
  1. 7 tests/user/user.test \PatternsUserTestCase::testRoleDelete()
1 call to PatternsUserTestCase::testRoleDelete()
PatternsUserTestCase::testCreateModifyDelete in tests/user/user.test

File

tests/user/user.test, line 183
SimpleTests for the User component of Patterns. TODO: permissions.

Class

PatternsUserTestCase
@file SimpleTests for the User component of Patterns. TODO: permissions.

Code

private function testRoleDelete() {

  // Run the pattern.
  parent::runFile('user_role_delete.yaml', 'Role (delete)', $this->user_tests_dir);

  // The role should not exist at this point. We assume the rid as 4, since at least one role will have been created
  $role_count = db_select('role', 'r')
    ->fields('r', array(
    'name',
  ))
    ->condition('name', 'test_role_mod')
    ->countQuery()
    ->execute()
    ->fetchField();
  $this
    ->assertIdentical($role_count, '0', t('The role should not exist at this point.'));
}