You are here

public function NodeImportTestCase::nodeImportCreateUser in Node import 6

Create the user that will do the import.

Parameters

$perms: Array of permissions. The 'import content' permission will be added.

Return value

User object.

1 call to NodeImportTestCase::nodeImportCreateUser()
NodeImportNode::testBasicNode in tests/supported/node.test
Test import of basic node.

File

tests/NodeImportTestCase.php, line 47
DrupalWebTestCase wrapper with some extra functions to ease the development of node_import tests.

Class

NodeImportTestCase
@file DrupalWebTestCase wrapper with some extra functions to ease the development of node_import tests.

Code

public function nodeImportCreateUser($perms = array()) {
  if (!is_array($perms)) {
    $perms = func_get_args();
  }
  $perms[] = 'import content';
  $user = $this
    ->drupalCreateUser($perms);
  return $user;
}