You are here

protected function PMPAPIPushWebTestCase::createContentType in Public Media Platform API Integration 7

Creates a new content type.

Parameters

$instances: Any instances to be added to the content type.

4 calls to PMPAPIPushWebTestCase::createContentType()
PMPAPIPushWebTestCase::testPmpAPIPushNodeWithRelatedImage in pmpapi_push/tests/pmpapi_push.test
Pushes node (with attached image) to the PMP.
PMPAPIPushWebTestCase::testPmpAPIPushPushNode in pmpapi_push/tests/pmpapi_push.test
Pushes a node to the PMP.
PMPAPIPushWebTestCase::testPmpAPIPushQueueDelete in pmpapi_push/tests/pmpapi_push.test
Pushes a node, fails to delete, queues doc, succeeds.
PMPAPIPushWebTestCase::testPmpAPIPushStopDeleteAttempt in pmpapi_push/tests/pmpapi_push.test
Pushes a node, and then tries to delete three times (with bad API credentials).

File

pmpapi_push/tests/pmpapi_push.test, line 229

Class

PMPAPIPushWebTestCase
Tests the functionality of the PMPAPI push module.

Code

protected function createContentType($instances = array()) {
  $content_type = $this
    ->drupalCreateContentType(array(
    'type' => $this->nodetype,
  ));
  if (!empty($instances)) {
    foreach ($instances as $instance) {
      $instance['entity_type'] = 'node';
      $instance['bundle'] = $this->nodetype;
      field_create_instance($instance);
    }
  }
  return $content_type;
}