You are here

function WorkbenchAccessTestCase::createWorkbenchAccessNodes in Workbench Access 7

Helper function to create nodes.

4 calls to WorkbenchAccessTestCase::createWorkbenchAccessNodes()
WorkbenchAccessBaseTestCase::testWorkbenchAccessInstall in tests/workbench_access.test
WorkbenchAccessMenuTestCase::testWorkbenchAccessMenu in tests/workbench_access.test
WorkbenchAccessRoleTestCase::testWorkbenchAccessRoles in tests/workbench_access.test
WorkbenchAccessTaxonomyTestCase::testWorkbenchAccessTaxonomy in tests/workbench_access.test

File

tests/workbench_access.test, line 30
Test file for Workbench Access.

Class

WorkbenchAccessTestCase
@file Test file for Workbench Access.

Code

function createWorkbenchAccessNodes($count = 10) {

  // Create some nodes.
  for ($i = 0; $i < $count; $i++) {
    $settings = array(
      'type' => 'page',
      'title' => $this
        ->randomName(32),
      'body' => array(
        LANGUAGE_NONE => array(
          array(
            $this
              ->randomName(64),
          ),
        ),
      ),
      'promote' => 1,
    );
    $this
      ->drupalCreateNode($settings);
  }
}