diff --git a/core/modules/node/node.test b/core/modules/node/node.test index 1dbcaf3..be3ff89 100644 --- a/core/modules/node/node.test +++ b/core/modules/node/node.test @@ -1447,6 +1447,32 @@ class NodeTypeTestCase extends NodeWebTestCase { $this->assertTrue(isset($types[$type]->disabled) && empty($types[$type]->disabled), t('%type type is enabled.', array('%type' => $type))); } } + + /** + * Tests handling of node type types that are. + */ + public function testNodeTypeDisabled() { + $test_type = new stdClass(); + $test_type->base = 'not_node_content'; + $test_type->name = t('Test Type'); + $test_type->type = 'test'; + + node_type_save($test_type); + $updated = db_update('node_type') + ->fields(array('disabled' => 1)) + ->condition('type', $test_type->type) + ->execute(); + $this->assertTrue(($updated == 1), 'Successfully disabled custom content type.'); + $info = node_type_get_type($test_type->type); + $this->assertTrue($info !== FALSE, 'Return data from node_type_get_type is valid for a disabled content type with a base that is not node_content.'); + + $target_type = 'book'; + module_enable(array($target_type), FALSE); + module_disable(array($target_type)); + $info = node_type_get_type($target_type); + $this->assertTrue($info !== FALSE, 'Return data from node_type_get_type is valid for a disabled content type with base of node_content.'); + + } } /**