function LegalTestCase::setSettings in Legal 7
Same name and namespace in other branches
- 6.8 legal.test \LegalTestCase::setSettings()
- 7.2 legal.test \LegalTestCase::setSettings()
Set module settings. This can only be called once from each test case instance.
6 calls to LegalTestCase::setSettings()
- LegalHTMLTextDisplayTestCase::setUp in ./
legal.test - Sets up a Drupal site for running functional and integration tests.
- LegalLinkDisplayTestCase::setUp in ./
legal.test - Sets up a Drupal site for running functional and integration tests.
- LegalPasswordResetTestCase::setUp in ./
legal.test - Sets up a Drupal site for running functional and integration tests.
- LegalRegisterTestCase::setUp in ./
legal.test - Sets up a Drupal site for running functional and integration tests.
- LegalScrollBoxCSSDisplayTestCase::setUp in ./
legal.test - Sets up a Drupal site for running functional and integration tests.
File
- ./
legal.test, line 29 - Tests for Legal module.
Class
- LegalTestCase
- Legal module base test class.
Code
function setSettings($edit) {
// Had to move to creating an user for every change in settings, since
// creating this in setUp() was not working.
$admin_user = $this
->drupalCreateUser(array(
'administer Terms and Conditions',
));
$this
->drupalLogin($admin_user);
$this
->drupalPost('admin/config/people/legal', $edit, t('Save'));
// Check account wasn't created.
$this
->assertText(t('Terms & Conditions have been saved.'), 'T&C text setup correctly');
// Log user out.
$this
->drupalLogout();
}