Misses a call to node_types_rebuild() if we want to be able to actually use the content type within the request..

CommentFileSizeAuthor
drupal_test_case.php_.patch528 bytesyched

Comments

Rok Žlender’s picture

Are you sure? This is what I used to test drupalCreateContentType

  $type = $this->drupalCreateContentType();
  $node = $this->drupalCreateNode(array('type' => $type->name));

And it created node with newly created node type. Or did you have some other use case in mind?

yched’s picture

It will work, if you don't have, say, CCK enabled :-)

Calls to node_get_types('types') won't return your newly created type - meaning, the type is unknown to the outside world.
CCK then raises errors trying to handle saving a node which node type is reported not to exist.

Rok Žlender’s picture

Status: Needs review » Fixed

OK I believe you :), committed.

Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.