security update link,module_filters,search_api_solr,ubercart,views
This commit is contained in:
@@ -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,24 +24,32 @@ class LinkContentCrudTest extends DrupalWebTestCase {
|
||||
);
|
||||
}
|
||||
|
||||
function setUp() {
|
||||
/**
|
||||
* 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.
|
||||
$perms = user_role_permissions(array(array_search('administrator', user_roles()) => 'administrator'));
|
||||
$perms = array_keys($perms[array_search('administrator', user_roles())]);
|
||||
$admin = $this->drupalCreateUser($perms);
|
||||
$this->drupalLogin($admin);
|
||||
$this->web_user = $this->drupalCreateUser(array(
|
||||
'administer content types',
|
||||
'administer fields',
|
||||
));
|
||||
$this->drupalLogin($this->web_user);
|
||||
|
||||
$this->drupalGet('admin/structure/types');
|
||||
|
||||
@@ -71,4 +88,5 @@ class LinkContentCrudTest extends DrupalWebTestCase {
|
||||
$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.');
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user