public function GNodeWebTestBase::createNodeInGroup in Group 7
Create a test node in a specified group.
Parameters
int $gid:
string $node_type: Defaults to 'page'
int $status: Defaults to 1 (published)
int $uid: Defaults to 1 (root user)
Return value
object The node.
23 calls to GNodeWebTestBase::createNodeInGroup()
- GNodeBypassAccessTests::testAnonymousBypassGroupAccess in modules/
gnode/ tests/ gnode.test - Test anonymous user's access to nodes in a group when granted bypass group access.
- GNodeBypassAccessTests::testMemberBypassGroupAccess in modules/
gnode/ tests/ gnode.test - Test member user's access to nodes in a group when granted bypass group access.
- GNodeBypassAccessTests::testOutsiderBypassGroupAccess in modules/
gnode/ tests/ gnode.test - Test outsider user's access to nodes in a group when granted bypass group access.
- GNodeDeleteAccessTests::testAnonymousDeleteAccess in modules/
gnode/ tests/ gnode.test - Test anonymous user's delete access to nodes in a group. This checks via several permissions: the delete any node, delete own node and administer group.
- GNodeDeleteAccessTests::testMemberDeleteAccess in modules/
gnode/ tests/ gnode.test - Test member user's delete access to nodes in a group. This checks via several permissions: the delete any node, delete own node and administer group.
File
- modules/
gnode/ tests/ gnode.test, line 184 - Tests for the gnode module.
Class
- GNodeWebTestBase
- Base class provides a number of helper functions.
Code
public function createNodeInGroup($gid, $node_type = 'page', $status = 1, $uid = 1) {
return $this
->drupalCreateNode(array(
'type' => $node_type,
'uid' => $uid,
'status' => $status,
'promote' => 1,
'group' => $gid,
));
}