function MerciTestBase::setUp in MERCI (Manage Equipment Reservations, Checkout and Inventory) 8.2
Sets up a Drupal site for running functional and integration tests.
Installs Drupal with the installation profile specified in \Drupal\simpletest\WebTestBase::$profile into the prefixed database.
Afterwards, installs any additional modules specified in the static \Drupal\simpletest\WebTestBase::$modules property of each class in the class hierarchy.
After installation all caches are flushed and several configuration values are reset to the values of the parent site executing the test, since the default values may be incompatible with the environment in which tests are being executed.
Overrides WebTestBase::setUp
1 call to MerciTestBase::setUp()
- MerciTest::setUp in src/
Tests/ MerciTest.php - Modules to enable.
1 method overrides MerciTestBase::setUp()
- MerciTest::setUp in src/
Tests/ MerciTest.php - Modules to enable.
File
- src/
MerciTestBase.php, line 34 - Contains \Drupal\merci\MerciTestBase.
Class
- MerciTestBase
- Tests pager functionality.
Namespace
Drupal\merciCode
function setUp() {
// Enable the module.
parent::setUp();
// Create admin user.
$this->admin_user = $this
->createUser(array(
'administer nodes',
// Required to set revision checkbox
'administer views',
'bypass node access',
'administer content types',
'access administration pages',
'administer site configuration',
'administer node fields',
));
// Login the admin user.
$this
->drupalLogin($this->admin_user);
}