function VariableCheckTestCase::testVariableAdminPage in Variable Check 7
Access the admin page and verify the good variable is not shown whilst the bad variable is.
File
- ./
variablecheck.test, line 62 - Tests for Variablecheck.
Class
- VariableCheckTestCase
- Functional tests for the variablecheck module.
Code
function testVariableAdminPage() {
$account = $this
->drupalCreateUser(array(
'access site reports',
'check variables',
));
$this
->drupalLogin($account);
$this
->drupalGet('admin/reports/variablecheck');
$this
->assertText('Found one invalid variable', 'Detected an invalid variable.');
$this
->assertPattern("/variablecheck_bad.*bad value/", "Detected the correct bad variable and its value.");
}