Révision c8740e19
Ajouté par Assos Assos il y a plus de 9 ans
drupal7/sites/all/modules/link/tests/link.crud.test | ||
---|---|---|
37 | 37 |
// Create the content type. |
38 | 38 |
$this->clickLink(t('Add content type')); |
39 | 39 |
|
40 |
$edit = array (
|
|
40 |
$edit = array( |
|
41 | 41 |
'name' => $content_type_friendly, |
42 | 42 |
'type' => $content_type_machine, |
43 | 43 |
); |
44 | 44 |
$this->drupalPost(NULL, $edit, t('Save and add fields')); |
45 | 45 |
$this->assertText(t('The content type @name has been added.', array('@name' => $content_type_friendly))); |
46 | 46 |
|
47 |
//$field = $this->createField(array('type' => 'link', 'widget_type' => 'link'), 0); |
|
48 | 47 |
// Now add a singleton field. |
49 | 48 |
$single_field_name_friendly = $this->randomName(20); |
50 | 49 |
$single_field_name_machine = strtolower($this->randomName(10)); |
51 |
$edit = array (
|
|
50 |
$edit = array( |
|
52 | 51 |
'fields[_add_new_field][label]' => $single_field_name_friendly, |
53 | 52 |
'fields[_add_new_field][field_name]' => $single_field_name_machine, |
54 | 53 |
'fields[_add_new_field][type]' => 'link_field', |
... | ... | |
69 | 68 |
menu_rebuild(); |
70 | 69 |
$type_exists = db_query('SELECT 1 FROM {node_type} WHERE type = :type', array(':type' => $content_type_machine))->fetchField(); |
71 | 70 |
$this->assertTrue($type_exists, 'The new content type has been created in the database.'); |
72 |
|
|
73 |
/*$table_schema = drupal_get_schema(); |
|
74 |
$this->assertEqual(1, 1, print_r(array_keys($table_schema), TRUE)); |
|
75 |
// Check the schema - the values should be in the per-type table. |
|
76 |
$this->assertSchemaMatchesTables(array( |
|
77 |
'per_type' => array( |
|
78 |
$this->content_types[0]->type => array($field['field_name'] => array('url', 'title', 'attributes')), |
|
79 |
), |
|
80 |
));*/ |
|
81 | 71 |
} |
82 | 72 |
} |
Formats disponibles : Unified diff
Weekly update of contrib modules