updated contrib modules

This commit is contained in:
2019-07-09 12:22:32 +02:00
parent cc3b64a193
commit 438237e852
469 changed files with 17307 additions and 8396 deletions

View File

@@ -2,11 +2,20 @@
/**
* @file
* Basic CRUD simpletests for the link module, based off of content.crud.test in CCK.
* File for Crud Tests.
*
* Basic CRUD simpletests for the link module, based off of content.crud.test in
* CCK.
*/
/**
* Content Crud.
*/
class LinkContentCrudTest extends DrupalWebTestCase {
/**
* Get Info.
*/
public static function getInfo() {
return array(
'name' => 'Link CRUD - Basic API tests',
@@ -15,47 +24,53 @@ class LinkContentCrudTest extends DrupalWebTestCase {
);
}
function setUp() {
parent::setUp('field_ui', 'link'); // was views?
//$this->loginWithPermissions();
/**
* Setup.
*/
public function setUp() {
parent::setUp('field_ui', 'link');
}
/**
* All we're doing here is creating a content type, creating a simple link field
* on that content type.
* Create Field API.
*
* All we're doing here is creating a content type, creating a simple link
* field on that content type.
*
* @codingStandardsIgnoreStart
*/
function testLinkCreateFieldAPI() {
public function testLinkCreateFieldAPI() {
// @codingStandardsIgnoreEnd
$content_type_friendly = $this->randomName(20);
$content_type_machine = strtolower($this->randomName(10));
$title = $this->randomName(20);
// Create and login user.
$account = $this->drupalCreateUser(array('administer content types'));
$this->drupalLogin($account);
$this->web_user = $this->drupalCreateUser(array(
'administer content types',
'administer fields',
));
$this->drupalLogin($this->web_user);
$this->drupalGet('admin/structure/types');
// Create the content type.
$this->clickLink(t('Add content type'));
$edit = array (
$edit = array(
'name' => $content_type_friendly,
'type' => $content_type_machine,
);
$this->drupalPost(NULL, $edit, t('Save and add fields'));
$this->assertText(t('The content type @name has been added.', array('@name' => $content_type_friendly)));
//$field = $this->createField(array('type' => 'link', 'widget_type' => 'link'), 0);
// Now add a singleton field.
$single_field_name_friendly = $this->randomName(20);
$single_field_name_machine = strtolower($this->randomName(10));
$edit = array (
$edit = array(
'fields[_add_new_field][label]' => $single_field_name_friendly,
'fields[_add_new_field][field_name]' => $single_field_name_machine,
'fields[_add_new_field][type]' => 'link_field',
'fields[_add_new_field][widget_type]' => 'link_field',
);
$this->drupalPost(NULL, $edit, t('Save'));
@@ -72,14 +87,6 @@ class LinkContentCrudTest extends DrupalWebTestCase {
menu_rebuild();
$type_exists = db_query('SELECT 1 FROM {node_type} WHERE type = :type', array(':type' => $content_type_machine))->fetchField();
$this->assertTrue($type_exists, 'The new content type has been created in the database.');
/*$table_schema = drupal_get_schema();
$this->assertEqual(1, 1, print_r(array_keys($table_schema), TRUE));
// Check the schema - the values should be in the per-type table.
$this->assertSchemaMatchesTables(array(
'per_type' => array(
$this->content_types[0]->type => array($field['field_name'] => array('url', 'title', 'attributes')),
),
));*/
}
}