public function YamlFormTestBase::setUp in YAML Form 8
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
4 calls to YamlFormTestBase::setUp()
- YamlFormElementManagedFilePublicTest::setUp in src/
Tests/ YamlFormElementManagedFilePublicTest.php - Sets up a Drupal site for running functional and integration tests.
- YamlFormElementManagedFileTest::setUp in src/
Tests/ YamlFormElementManagedFileTest.php - Sets up a Drupal site for running functional and integration tests.
- YamlFormSubmissionViewTest::setUp in src/
Tests/ YamlFormSubmissionViewTest.php - Sets up a Drupal site for running functional and integration tests.
- YamlFormUiElementPropertiesTest::setUp in modules/
yamlform_ui/ src/ Tests/ YamlFormUiElementPropertiesTest.php - Sets up a Drupal site for running functional and integration tests.
4 methods override YamlFormTestBase::setUp()
- YamlFormElementManagedFilePublicTest::setUp in src/
Tests/ YamlFormElementManagedFilePublicTest.php - Sets up a Drupal site for running functional and integration tests.
- YamlFormElementManagedFileTest::setUp in src/
Tests/ YamlFormElementManagedFileTest.php - Sets up a Drupal site for running functional and integration tests.
- YamlFormSubmissionViewTest::setUp in src/
Tests/ YamlFormSubmissionViewTest.php - Sets up a Drupal site for running functional and integration tests.
- YamlFormUiElementPropertiesTest::setUp in modules/
yamlform_ui/ src/ Tests/ YamlFormUiElementPropertiesTest.php - Sets up a Drupal site for running functional and integration tests.
File
- src/
Tests/ YamlFormTestBase.php, line 31
Class
- YamlFormTestBase
- Defines an abstract test base for form tests.
Namespace
Drupal\yamlform\TestsCode
public function setUp() {
parent::setUp();
// Storage.
$this->submissionStorage = \Drupal::entityTypeManager()
->getStorage('yamlform_submission');
// Set page.front (aka <front>) to /node instead of /user/login.
\Drupal::configFactory()
->getEditable('system.site')
->set('page.front', '/node')
->save();
// Place blocks.
$this
->placeBlocks();
// Create users.
$this
->createUsers();
// Login the normal user.
$this
->drupalLogin($this->normalUser);
}