Creates a custom content type based on default settings.
$settings: An array of settings to change from the defaults. Example: 'type' => 'foo'.
Created content type.
protected function drupalCreateContentType($settings = array()) {
$name = strtolower($this
->randomMachineName(8));
$values = array(
'type' => $name,
'name' => $name,
'base' => 'node_content',
'title_label' => 'Title',
'body_label' => 'Body',
'has_title' => 1,
'has_body' => 1,
);
$type = NodeType::create($values);
$saved = $type
->save();
node_add_body_field($type);
$this
->assertEquals(SAVED_NEW, $saved);
return $type;
}