function setUp() { parent::setUp(); // Add some basic test nodes. $this->nodes = array(); $this->nodes[] = $this->drupalCreateNode(array('created' => 100000)); $this->nodes[] = $this->drupalCreateNode(array('created' => 200000)); $this->nodes[] = $this->drupalCreateNode(array('created' => 300000)); $this->nodes[] = $this->drupalCreateNode(array('created' => time() + 86400)); $this->map = array('nid' => 'nid'); }
protected function setUp() { parent::setUp(); // Create content type with unlimited text field. $node_type = $this->drupalCreateContentType(array('type' => 'page', 'name' => 'Basic page')); // Create the unlimited text field. $field_storage = entity_create('field_storage_config', array('field_name' => $this->fieldName, 'entity_type' => 'node', 'type' => 'text', 'cardinality' => FieldStorageDefinitionInterface::CARDINALITY_UNLIMITED)); $field_storage->save(); // Create an instance of the text field on the content type. $field = array('field_storage' => $field_storage, 'bundle' => $node_type->id()); entity_create('field_config', $field)->save(); }
protected function setUp() { parent::setUp(); $this->enableViewsTestModule(); }
function setUp() { parent::setUp(); // Create Article content type. $this->drupalCreateContentType(['type' => 'article', 'name' => 'Article']); }
/** * {@inheritdoc} */ protected function setUp() { parent::setUp(); $admin_user = $this->drupalCreateUser(['access content overview', 'administer nodes', 'bypass node access']); $this->drupalLogin($admin_user); }