class AccessSchemeInterfaceTest in Access Control Kit 7
Tests the access scheme interface.
Hierarchy
- class \DrupalTestCase
- class \DrupalWebTestCase
- class \AccessWebTestCase
- class \AccessSchemeInterfaceTest
- class \AccessWebTestCase
- class \DrupalWebTestCase
Expanded class hierarchy of AccessSchemeInterfaceTest
File
- ./
access.test, line 187 - Tests for the access control kit module.
View source
class AccessSchemeInterfaceTest extends AccessWebTestCase {
/**
* A user with administrative access.
*
* @var object
*/
protected $adminUser;
/**
* The role ID of an ACK-enabled role.
*
* @var int
*/
protected $ackRoleRid;
/**
* Implements getInfo(), required method for SimpleTest.
*/
public static function getInfo() {
return array(
'name' => 'Access scheme interface',
'description' => 'Tests the access scheme admin interface.',
'group' => 'Access control kit',
);
}
/**
* Overrides DrupalWebTestCase::setUp().
*/
public function setUp() {
// Enable the access control kit module.
parent::setUp(array(
'access',
));
// Create and log in our admin user.
$this->adminUser = $this
->drupalCreateUser(array(
'administer access schemes',
));
$this
->drupalLogin($this->adminUser);
// Create a user role for use in the access scheme.
$this->ackRoleRid = $this
->drupalCreateRole(array(
'access content',
));
}
/**
* Create and edit an access scheme via the user interface.
*/
public function testSchemeInterface() {
// Visit the scheme admin overview page.
$this
->drupalGet('admin/structure/access');
// Create a new scheme through the admin form.
$this
->clickLink(t('Add access scheme'));
$this
->clickLink(t('Boolean'));
$this
->assertText(t('Add access scheme: @type', array(
'@type' => t('Boolean'),
)));
$edit = array();
$machine_name = drupal_strtolower($this
->randomName());
$edit['machine_name'] = $machine_name;
$edit['name'] = $this
->randomName();
$edit['description'] = $this
->randomName();
$edit['roles[' . $this->ackRoleRid . ']'] = TRUE;
$this
->drupalPost(NULL, $edit, t('Save access scheme and continue'));
$this
->assertRaw(t('Added access scheme %name.', array(
'%name' => $edit['name'],
)), 'Scheme created successfully.');
$this
->drupalGet('admin/structure/access');
$this
->assertText(t('@name (Machine name: @machine_name)', array(
'@name' => $edit['name'],
'@machine_name' => $machine_name,
)), 'Scheme found in the scheme admin overview listing.');
// Confirm that all submitted values were saved.
$this
->clickLink(t('edit'));
$this
->assertFieldByName('name', $edit['name'], 'The name field is correctly set to ' . $edit['name']);
$this
->assertFieldByName('machine_name', $edit['machine_name'], 'The machine_name field is correctly set to ' . $edit['machine_name']);
$machine_name_disabled = $this
->xpath('//input[@id=:id and @disabled="disabled"]', array(
':id' => 'edit-machine-name',
));
$this
->assertTrue($machine_name_disabled, 'The machine name cannot be changed.');
$this
->assertFieldByName('description', $edit['description'], 'The description field is correctly set to ' . $edit['description']);
$this
->assertFieldChecked('edit-roles-' . $this->ackRoleRid, 'The role is correctly selected.');
$this
->assertText(t('No access-controllable objects available.'), 'Informs that no access-controllable object types have been defined.');
// Edit the scheme.
$edit = array();
$edit['name'] = $this
->randomName();
$this
->drupalPost(NULL, $edit, t('Save access scheme'));
$this
->assertRaw(t('Updated access scheme %name.', array(
'%name' => $edit['name'],
)), 'Scheme updated successfully.');
$this
->assertText(t('@name (Machine name: @machine_name)', array(
'@name' => $edit['name'],
'@machine_name' => $machine_name,
)), 'Updated scheme found in the scheme admin overview listing.');
// Check integration with the Field UI.
$this
->clickLink(t('manage fields'));
$this
->assertText(t('Manage fields'));
$this
->assertText(t('Access control kit user reference'));
$this
->assertText(t('Access control kit role reference'));
$this
->assertText('ack_' . $machine_name);
$this
->drupalGet('admin/structure/access');
$this
->clickLink(t('manage display'));
$this
->assertText(t('Manage display'));
$this
->assertText(t('User'));
$this
->assertText(t('Role'));
// Try to submit a new scheme with a duplicate human-readable name.
$edit['machine_name'] = drupal_strtolower($this
->randomName());
$this
->drupalPost('admin/structure/access/add/boolean', $edit, t('Save access scheme and continue'));
$this
->assertRaw(t('The name %name is already in use.', array(
'%name' => $edit['name'],
)));
// Try to submit a new scheme with a duplicate machine name.
$edit['name'] = $this
->randomName();
$edit['machine_name'] = $machine_name;
$this
->drupalPost('admin/structure/access/add/boolean', $edit, t('Save access scheme and continue'));
$this
->assertText(t('The machine-readable name is already in use. It must be unique.'));
// Try to submit an invalid machine name.
$edit['machine_name'] = '!&^%';
$this
->drupalPost('admin/structure/access/add/boolean', $edit, t('Save access scheme and continue'));
$this
->assertText(t('The machine-readable name must contain only lowercase letters, numbers, and underscores.'));
// Try to submit some disallowed machine names.
foreach (array(
'add',
'0',
) as $bad_name) {
$edit['machine_name'] = $bad_name;
$this
->drupalPost('admin/structure/access/add/boolean', $edit, t('Save access scheme and continue'));
$this
->assertText(t('Invalid machine-readable name. Enter a name other than @invalid.', array(
'@invalid' => $bad_name,
)));
}
// Ensure that scheme names and descriptions are escaped properly.
$edit = array();
$description = '<strong>' . $this
->randomName() . '</strong>';
$edit['machine_name'] = 'don_t_panic';
$edit['name'] = 'Don\'t Panic & Carry a Towel';
$edit['description'] = '<script>' . $description . '</script>';
$this
->drupalPost('admin/structure/access/add/boolean', $edit, t('Save access scheme and continue'));
// Check that the name isn't double-filtered when used as the page title.
$site_name = variable_get('site_name', 'Drupal');
$this
->assertTitle(t("Don't Panic & Carry a Towel | @site-name", array(
'@site-name' => $site_name,
)));
$this
->assertNoTitle(t('Don't Panic & Carry a Towel | @site-name', array(
'@site-name' => $site_name,
)));
// Check that the name is sanitized in overview.
$this
->drupalGet('admin/structure/access');
$this
->assertRaw('Don't Panic & Carry a Towel');
$this
->assertNoRaw($edit['name']);
// Check that the description is sanitized in overview.
$this
->assertRaw($description);
$this
->assertNoRaw($edit['description']);
}
/**
* Confirm that realm fields are hidden from the scheme UI and Field UI.
*/
public function testSchemeRealmFieldsHidden() {
// Confirm that we're starting clean.
$this
->drupalGet('admin/structure/access/add');
$this
->assertNoText(t('List (integer) field'), 'The list (integer) scheme type is not available.');
// Create a user account scheme, which uses a list_integer realm field.
$edit = array();
$machine_name = drupal_strtolower($this
->randomName());
$edit['machine_name'] = $machine_name;
$edit['name'] = $this
->randomName();
$this
->drupalPost('admin/structure/access/add/user', $edit, t('Save access scheme and continue'));
$this
->drupalGet('admin/structure/access');
$this
->assertText(t('@name (Machine name: @machine_name)', array(
'@name' => $edit['name'],
'@machine_name' => $machine_name,
)), 'Scheme found in the scheme admin overview listing.');
// Confirm that realm fields cannot be deleted through the Field UI.
$this
->drupalGet('admin/structure/access/' . $machine_name . '/fields/ack_' . $machine_name . '/delete');
$this
->assertText(t('This field is locked and cannot be deleted.'), 'Realm fields are locked.');
// Confirm that the presence of a scheme with a list_integer realm field
// does not make the list_integer scheme type available.
$this
->drupalGet('admin/structure/access/add');
$this
->assertNoText(t('List (integer) field'), 'Realm fields are ignored when determining whether a list-based scheme can be created.');
// Create a valid list_integer field and confirm that the scheme type does
// become available.
$field = array(
'field_name' => 'field_valid_list',
'type' => 'list_integer',
);
field_create_field($field);
$this
->drupalGet('admin/structure/access/add');
$this
->assertText(t('List (integer) field'), 'List-based schemes become available when usable fields are present.');
// Confirm that the scheme's realm field is hidden from the scheme UI.
$this
->clickLink(t('List (integer) field'));
$this
->assertNoRaw('ack_' . $machine_name, 'Realm fields are hidden when selecting the base field for a list-based scheme.');
$this
->assertRaw($field['field_name'], 'Usable list fields are selectable on a list-based scheme.');
// Confirm that realm fields are hidden from the Field UI.
$scheme = $this
->createScheme();
$this
->drupalGet('admin/structure/access/' . $scheme->machine_name . '/fields');
$this
->assertNoRaw('ack_' . $machine_name, 'Realm fields are hidden from the Field UI.');
}
/**
* Test the scheme overview with no schemes.
*/
public function testSchemeOverviewEmpty() {
// Delete all schemes.
$schemes = access_scheme_load_multiple(FALSE);
foreach ($schemes as $sid => $scheme) {
access_scheme_delete($sid);
}
// Confirm that no schemes remain in the database.
$this
->assertFalse(access_scheme_load_multiple(FALSE), 'No access schemes found in the database.');
// Check the default message for no schemes.
$this
->drupalGet('admin/structure/access');
$this
->assertText(t('No access schemes available.'), 'No access schemes were found.');
}
/**
* Delete an access scheme via the user interface.
*/
public function testSchemeDelete() {
// Create an access scheme.
$scheme = $this
->createScheme();
$scheme = access_scheme_load($scheme->sid, TRUE);
$this
->assertTrue($scheme, 'Access scheme found in the database.');
// Create an access grant in the scheme.
$grant = $this
->createGrant($scheme);
$grant = access_grant_load($grant->gid, TRUE);
$this
->assertTrue($grant, 'Access grant found in the database.');
// Check deleting from the overview page.
$this
->drupalGet('admin/structure/access');
$this
->clickLink(t('delete'));
$this
->assertRaw(t('Are you sure you want to delete the access scheme %name?', array(
'%name' => $scheme->name,
)), '[confirm deletion] Asks for confirmation.');
// Delete the scheme.
$edit = array();
$this
->drupalPost('admin/structure/access/' . $scheme->machine_name, $edit, t('Delete access scheme'));
$this
->assertRaw(t('Are you sure you want to delete the access scheme %name?', array(
'%name' => $scheme->name,
)), '[confirm deletion] Asks for confirmation.');
$this
->assertRaw(t('All access grants within the scheme will also be deleted. %scheme currently contains 1 access grant on your site. If you remove this scheme, the user may not be able to exercise the permissions assigned by that grant.', array(
'%scheme' => $scheme->name,
)), '[confirm deletion] Informs that all grants will be deleted.');
$this
->assertText(t('This action cannot be undone.'), '[confirm deletion] Informs that deletion is permanent.');
// Confirm deletion.
$this
->drupalPost(NULL, NULL, t('Delete'));
$this
->assertRaw(t('Deleted access scheme %name.', array(
'%name' => $scheme->name,
)), 'Access scheme deleted.');
$this
->assertFalse(access_grant_load($grant->gid, TRUE), 'Access grant is not found in the database.');
$this
->assertFalse(access_scheme_load($scheme->sid, TRUE), 'Access scheme is not found in the database.');
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
AccessSchemeInterfaceTest:: |
protected | property | The role ID of an ACK-enabled role. | |
AccessSchemeInterfaceTest:: |
protected | property | A user with administrative access. | |
AccessSchemeInterfaceTest:: |
public static | function | Implements getInfo(), required method for SimpleTest. | |
AccessSchemeInterfaceTest:: |
public | function |
Overrides DrupalWebTestCase::setUp(). Overrides DrupalWebTestCase:: |
|
AccessSchemeInterfaceTest:: |
public | function | Delete an access scheme via the user interface. | |
AccessSchemeInterfaceTest:: |
public | function | Create and edit an access scheme via the user interface. | |
AccessSchemeInterfaceTest:: |
public | function | Test the scheme overview with no schemes. | |
AccessSchemeInterfaceTest:: |
public | function | Confirm that realm fields are hidden from the scheme UI and Field UI. | |
AccessWebTestCase:: |
public | function | Creates and returns a new access grant for the given scheme. | |
AccessWebTestCase:: |
public | function | Creates a list-based scheme with generic realms. | |
AccessWebTestCase:: |
public | function | Creates and returns a new access scheme with random properties. | |
AccessWebTestCase:: |
public | function | Creates a taxonomy-based scheme with randomly named realms. | |
DrupalTestCase:: |
protected | property | Assertions thrown in that test case. | |
DrupalTestCase:: |
protected | property | The database prefix of this test run. | |
DrupalTestCase:: |
protected | property | The original file directory, before it was changed for testing purposes. | |
DrupalTestCase:: |
public | property | Current results of this test case. | |
DrupalTestCase:: |
protected | property | Flag to indicate whether the test has been set up. | |
DrupalTestCase:: |
protected | property | ||
DrupalTestCase:: |
protected | property | ||
DrupalTestCase:: |
protected | property | This class is skipped when looking for the source of an assertion. | |
DrupalTestCase:: |
protected | property | The test run ID. | |
DrupalTestCase:: |
protected | property | Time limit for the test. | |
DrupalTestCase:: |
public | property | Whether to cache the installation part of the setUp() method. | |
DrupalTestCase:: |
public | property | Whether to cache the modules installation part of the setUp() method. | |
DrupalTestCase:: |
protected | property | URL to the verbose output file directory. | |
DrupalTestCase:: |
protected | function | Internal helper: stores the assert. | |
DrupalTestCase:: |
protected | function | Check to see if two values are equal. | |
DrupalTestCase:: |
protected | function | Check to see if a value is false (an empty string, 0, NULL, or FALSE). | |
DrupalTestCase:: |
protected | function | Check to see if two values are identical. | |
DrupalTestCase:: |
protected | function | Check to see if two values are not equal. | |
DrupalTestCase:: |
protected | function | Check to see if two values are not identical. | |
DrupalTestCase:: |
protected | function | Check to see if a value is not NULL. | |
DrupalTestCase:: |
protected | function | Check to see if a value is NULL. | |
DrupalTestCase:: |
protected | function | Check to see if a value is not false (not an empty string, 0, NULL, or FALSE). | |
DrupalTestCase:: |
public static | function | Delete an assertion record by message ID. | |
DrupalTestCase:: |
protected | function | Fire an error assertion. | 1 |
DrupalTestCase:: |
public | function | Handle errors during test runs. | 1 |
DrupalTestCase:: |
protected | function | Handle exceptions. | |
DrupalTestCase:: |
protected | function | Fire an assertion that is always negative. | |
DrupalTestCase:: |
public static | function | Converts a list of possible parameters into a stack of permutations. | |
DrupalTestCase:: |
protected | function | Cycles through backtrace until the first non-assertion method is found. | |
DrupalTestCase:: |
public static | function | Returns the database connection to the site running Simpletest. | |
DrupalTestCase:: |
public static | function | Store an assertion from outside the testing context. | |
DrupalTestCase:: |
protected | function | Fire an assertion that is always positive. | |
DrupalTestCase:: |
public static | function | Generates a random string containing letters and numbers. | |
DrupalTestCase:: |
public static | function | Generates a random string of ASCII characters of codes 32 to 126. | |
DrupalTestCase:: |
public | function | Run all tests in this class. | |
DrupalTestCase:: |
protected | function | Logs a verbose message in a text file. | |
DrupalWebTestCase:: |
protected | property | Additional cURL options. | |
DrupalWebTestCase:: |
protected | property | The content of the page currently loaded in the internal browser. | |
DrupalWebTestCase:: |
protected | property | The current cookie file used by cURL. | |
DrupalWebTestCase:: |
protected | property | The cookies of the page currently loaded in the internal browser. | |
DrupalWebTestCase:: |
protected | property | The handle of the current cURL connection. | |
DrupalWebTestCase:: |
protected | property | The value of the Drupal.settings JavaScript variable for the page currently loaded in the internal browser. | |
DrupalWebTestCase:: |
protected | property | The parsed version of the page. | |
DrupalWebTestCase:: |
protected | property | Whether the files were copied to the test files directory. | |
DrupalWebTestCase:: |
protected | property | The headers of the page currently loaded in the internal browser. | |
DrupalWebTestCase:: |
protected | property | HTTP authentication credentials (<username>:<password>). | |
DrupalWebTestCase:: |
protected | property | HTTP authentication method | |
DrupalWebTestCase:: |
protected | property | The current user logged in using the internal browser. | |
DrupalWebTestCase:: |
protected | property | The original shutdown handlers array, before it was cleaned for testing purposes. | |
DrupalWebTestCase:: |
protected | property | The original user, before it was changed to a clean uid = 1 for testing purposes. | |
DrupalWebTestCase:: |
protected | property | The content of the page currently loaded in the internal browser (plain text version). | |
DrupalWebTestCase:: |
protected | property | The profile to install as a basis for testing. | 20 |
DrupalWebTestCase:: |
protected | property | The number of redirects followed during the handling of a request. | |
DrupalWebTestCase:: |
protected | property | The current session ID, if available. | |
DrupalWebTestCase:: |
protected | property | The current session name, if available. | |
DrupalWebTestCase:: |
protected | property | The URL currently loaded in the internal browser. | |
DrupalWebTestCase:: |
protected | function | Asserts that a field exists with the given name or ID. | |
DrupalWebTestCase:: |
protected | function | Asserts that a field exists in the current page with the given ID and value. | |
DrupalWebTestCase:: |
protected | function | Asserts that a field exists in the current page with the given name and value. | |
DrupalWebTestCase:: |
protected | function | Asserts that a field exists in the current page by the given XPath. | |
DrupalWebTestCase:: |
protected | function | Asserts that a checkbox field in the current page is checked. | |
DrupalWebTestCase:: |
protected | function | Pass if a link with the specified label is found, and optional with the specified index. | |
DrupalWebTestCase:: |
protected | function | Pass if a link containing a given href (part) is found. | |
DrupalWebTestCase:: |
protected | function | Asserts that the most recently sent e-mail message has the given value. | |
DrupalWebTestCase:: |
protected | function | Asserts that the most recently sent e-mail message has the pattern in it. | |
DrupalWebTestCase:: |
protected | function | Asserts that the most recently sent e-mail message has the string in it. | |
DrupalWebTestCase:: |
protected | function | Asserts that each HTML ID is used for just a single element. | |
DrupalWebTestCase:: |
protected | function | Asserts that a field does not exist with the given name or ID. | |
DrupalWebTestCase:: |
protected | function | Asserts that a field does not exist with the given ID and value. | |
DrupalWebTestCase:: |
protected | function | Asserts that a field does not exist with the given name and value. | |
DrupalWebTestCase:: |
protected | function | Asserts that a field doesn't exist or its value doesn't match, by XPath. | |
DrupalWebTestCase:: |
protected | function | Asserts that a checkbox field in the current page is not checked. | |
DrupalWebTestCase:: |
protected | function | Pass if a link with the specified label is not found. | |
DrupalWebTestCase:: |
protected | function | Pass if a link containing a given href (part) is not found. | |
DrupalWebTestCase:: |
protected | function | Asserts that a select option in the current page is not checked. | |
DrupalWebTestCase:: |
protected | function | Will trigger a pass if the perl regex pattern is not present in raw content. | |
DrupalWebTestCase:: |
protected | function | Pass if the raw text is NOT found on the loaded page, fail otherwise. Raw text refers to the raw HTML that the page generated. | |
DrupalWebTestCase:: |
protected | function | Asserts the page did not return the specified response code. | |
DrupalWebTestCase:: |
protected | function | Pass if the text is NOT found on the text version of the page. The text version is the equivalent of what a user would see when viewing through a web browser. In other words the HTML has been filtered out of the contents. | |
DrupalWebTestCase:: |
protected | function | Pass if the page title is not the given string. | |
DrupalWebTestCase:: |
protected | function | Pass if the text is found MORE THAN ONCE on the text version of the page. | |
DrupalWebTestCase:: |
protected | function | Asserts that a select option in the current page is checked. | |
DrupalWebTestCase:: |
protected | function | Will trigger a pass if the Perl regex pattern is found in the raw content. | |
DrupalWebTestCase:: |
protected | function | Pass if the raw text IS found on the loaded page, fail otherwise. Raw text refers to the raw HTML that the page generated. | |
DrupalWebTestCase:: |
protected | function | Asserts the page responds with the specified response code. | |
DrupalWebTestCase:: |
protected | function | Pass if the text IS found on the text version of the page. The text version is the equivalent of what a user would see when viewing through a web browser. In other words the HTML has been filtered out of the contents. | |
DrupalWebTestCase:: |
protected | function | Helper for assertText and assertNoText. | |
DrupalWebTestCase:: |
protected | function | Asserts themed output. | |
DrupalWebTestCase:: |
protected | function | Pass if the page title is the given string. | |
DrupalWebTestCase:: |
protected | function | Pass if the text is found ONLY ONCE on the text version of the page. | |
DrupalWebTestCase:: |
protected | function | Helper for assertUniqueText and assertNoUniqueText. | |
DrupalWebTestCase:: |
protected | function | Pass if the internal browser's URL matches the given path. | |
DrupalWebTestCase:: |
protected | function | Builds an XPath query. | |
DrupalWebTestCase:: |
protected | function | Changes the database connection to the prefixed one. | |
DrupalWebTestCase:: |
protected | function | Check for meta refresh tag and if found call drupalGet() recursively. This function looks for the http-equiv attribute to be set to "Refresh" and is case-sensitive. | |
DrupalWebTestCase:: |
protected | function | Check to make sure that the array of permissions are valid. | |
DrupalWebTestCase:: |
protected | function | Follows a link by name. | |
DrupalWebTestCase:: |
protected | function | Helper function: construct an XPath for the given set of attributes and value. | |
DrupalWebTestCase:: |
protected | function | Copy the setup cache from/to another table and files directory. | |
DrupalWebTestCase:: |
protected | function | Runs cron in the Drupal installed by Simpletest. | |
DrupalWebTestCase:: |
protected | function | Close the cURL handler and unset the handler. | |
DrupalWebTestCase:: |
protected | function | Initializes and executes a cURL request. | |
DrupalWebTestCase:: |
protected | function | Reads headers and registers errors received from the tested site. | |
DrupalWebTestCase:: |
protected | function | Initializes the cURL connection. | |
DrupalWebTestCase:: |
protected | function | Compare two files based on size and file name. | |
DrupalWebTestCase:: |
protected | function | Creates a custom content type based on default settings. | |
DrupalWebTestCase:: |
protected | function | Creates a node based on default settings. | |
DrupalWebTestCase:: |
protected | function | Creates a role with specified permissions. | |
DrupalWebTestCase:: |
protected | function | Create a user with a given set of permissions. | |
DrupalWebTestCase:: |
protected | function | Retrieves a Drupal path or an absolute path. | |
DrupalWebTestCase:: |
protected | function | Retrieve a Drupal path or an absolute path and JSON decode the result. | |
DrupalWebTestCase:: |
protected | function | Gets the current raw HTML of requested page. | |
DrupalWebTestCase:: |
protected | function | Gets the value of an HTTP response header. If multiple requests were required to retrieve the page, only the headers from the last request will be checked by default. However, if TRUE is passed as the second argument, all requests will be processed… | |
DrupalWebTestCase:: |
protected | function | Gets the HTTP response headers of the requested page. Normally we are only interested in the headers returned by the last request. However, if a page is redirected or HTTP authentication is in use, multiple requests will be required to retrieve the… | |
DrupalWebTestCase:: |
protected | function | Gets an array containing all e-mails sent during this test case. | |
DrupalWebTestCase:: |
function | Get a node from the database based on its title. | ||
DrupalWebTestCase:: |
protected | function | Gets the value of the Drupal.settings JavaScript variable for the currently loaded page. | |
DrupalWebTestCase:: |
protected | function | Get a list files that can be used in tests. | |
DrupalWebTestCase:: |
protected | function | Generate a token for the currently logged in user. | |
DrupalWebTestCase:: |
protected | function | Retrieves only the headers for a Drupal path or an absolute path. | |
DrupalWebTestCase:: |
protected | function | Log in a user with the internal browser. | |
DrupalWebTestCase:: |
protected | function | ||
DrupalWebTestCase:: |
protected | function | Execute a POST request on a Drupal page. It will be done as usual POST request with SimpleBrowser. | |
DrupalWebTestCase:: |
protected | function | Execute an Ajax submission. | |
DrupalWebTestCase:: |
protected | function | Sets the raw HTML content. This can be useful when a page has been fetched outside of the internal browser and assertions need to be made on the returned page. | |
DrupalWebTestCase:: |
protected | function | Sets the value of the Drupal.settings JavaScript variable for the currently loaded page. | |
DrupalWebTestCase:: |
protected | function | Takes a path and returns an absolute path. | |
DrupalWebTestCase:: |
protected | function | Get all option elements, including nested options, in a select. | |
DrupalWebTestCase:: |
protected | function | Get the selected value from a select field. | |
DrupalWebTestCase:: |
protected | function | Returns the cache key used for the setup caching. | |
DrupalWebTestCase:: |
protected | function | Get the current URL from the cURL handler. | |
DrupalWebTestCase:: |
protected | function | Handle form input related to drupalPost(). Ensure that the specified fields exist and attempt to create POST data in the correct manner for the particular field type. | |
DrupalWebTestCase:: |
protected | function | Copies the cached tables and files for a cached installation setup. | |
DrupalWebTestCase:: |
protected | function | Parse content returned from curlExec using DOM and SimpleXML. | |
DrupalWebTestCase:: |
protected | function | Preload the registry from the testing site. | |
DrupalWebTestCase:: |
protected | function | Generates a database prefix for running tests. | |
DrupalWebTestCase:: |
protected | function | Prepares the current environment for running the test. | |
DrupalWebTestCase:: |
protected | function | Recursively copy one directory to another. | |
DrupalWebTestCase:: |
protected | function | Refresh the in-memory set of variables. Useful after a page request is made that changes a variable in a different thread. | 1 |
DrupalWebTestCase:: |
protected | function | Reset all data structures after having enabled new modules. | |
DrupalWebTestCase:: |
protected | function | Store the installation setup to a cache. | |
DrupalWebTestCase:: |
protected | function | Delete created files and temporary files directory, delete the tables created by setUp(), and reset the database prefix. | 6 |
DrupalWebTestCase:: |
protected | function | Outputs to verbose the most recent $count emails sent. | |
DrupalWebTestCase:: |
protected | function | Perform an xpath search on the contents of the internal browser. The search is relative to the root element (HTML tag normally) of the page. | |
DrupalWebTestCase:: |
function |
Constructor for DrupalWebTestCase. Overrides DrupalTestCase:: |
1 |