Simpletest created content types are not accessible on the admin pages

klausi - November 19, 2008 - 14:40
Project:SimpleTest
Version:6.x-2.x-dev
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:closed
Description

Hallo,

I have problems when I let simpletest create a content type and want to go to its admin page afterwards:

<?php
function testContentType() {
 
 
// Create admin user
 
$admin_user = $this->drupalCreateUser(array('access content', 'administer content types', 'administer nodes', 'access administration pages'));
 
$this->drupalLogin($admin_user);
       
 
// Create test content type
 
$content_type = $this->drupalCreateContentType();
 
 
// Go to admin page of it
 
$content_type_url = str_replace('_', '-', $content_type->type);
 
$this->drupalGet('admin/content/node-type/'. $content_type_url);
 
$this->assertText($content_type->name, 'content type name ('. $content_type->name .') is present on page');
}
?>

This small test fails, the simpletest browser does not fetch the specific content type page but the general content management page (admin/content). Is this intended behavior or is this a bug? Am I doing something wrong?

I have attached the simpletest file to reproduce this failure, just copy it to the "tests" subfolder in your simpletest module directory and it will apear on the Testing page in the group Simpletest.

AttachmentSize
content_type.test1.09 KB

#1

hass - November 22, 2008 - 18:53

#2

boombatower - February 8, 2009 - 04:04
Status:active» fixed

Complete backport of Drupal 7.x SimpleTest module. (voids all backports). (SimpleTest 2.6)

Please re-open if still an issue.

#3

System Message - February 22, 2009 - 04:10
Status:fixed» closed

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

 
 

Drupal is a registered trademark of Dries Buytaert.