protected function SharedTestFunctions::drupalCreateNotifyUsers in Notify 7
5 calls to SharedTestFunctions::drupalCreateNotifyUsers()
- TestNotify::setUp in ./
notify.test - Sets up a Drupal site for running functional and integration tests.
- TestNotifyBatch::setUp in ./
notify.test - Sets up a Drupal site for running functional and integration tests.
- TestNotifyMailSystem::setUp in ./
notify.test - Sets up a Drupal site for running functional and integration tests.
- TestNotifyPeriods::setUp in ./
notify.test - Sets up a Drupal site for running functional and integration tests.
- TestSendingHour::setUp in ./
notify.test - Sets up a Drupal site for running functional and integration tests.
File
- ./
notify.test, line 30 - Automated tests for notify.
Class
- SharedTestFunctions
- @file Automated tests for notify.
Code
protected function drupalCreateNotifyUsers($numb = 1, array $permissions = array()) {
for ($ii = 1; $ii <= $numb; $ii++) {
$user = $this
->drupalCreateUser(array(
'access notify',
));
// Subscribe this user to notifications,
db_insert('notify')
->fields(array(
'uid' => $user->uid,
'status' => 1,
'node' => 1,
'teasers' => 0,
'comment' => 1,
'attempts' => 0,
))
->execute();
}
return user_save($user);
}