Commit 8b003019 authored by Dries's avatar Dries
Browse files

- Patch #298137 by flobruit: drupalCreateContentType() now resets node permissions.

parent b2e725c0
......@@ -401,9 +401,14 @@ function drupalCreateContentType($settings = array()) {
$type = $forced + $settings + $defaults;
$type = (object)$type;
node_type_save($type);
$saved_type = node_type_save($type);
node_types_rebuild();
$this->assertEqual($saved_type, SAVED_NEW, t('Created content type %type.', array('%type' => $type->type)));
// Reset permissions so that permissions for this content type are available.
$this->checkPermissions(array(), TRUE);
return $type;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment