YamlFormTestBase.php in YAML Form 8
File
src/Tests/YamlFormTestBase.php
View source
<?php
namespace Drupal\yamlform\Tests;
use Drupal\simpletest\WebTestBase;
abstract class YamlFormTestBase extends WebTestBase {
use YamlFormTestTrait;
protected static $modules = [
'system',
'block',
'node',
'user',
'yamlform',
'yamlform_test',
];
protected $submissionStorage;
public function setUp() {
parent::setUp();
$this->submissionStorage = \Drupal::entityTypeManager()
->getStorage('yamlform_submission');
\Drupal::configFactory()
->getEditable('system.site')
->set('page.front', '/node')
->save();
$this
->placeBlocks();
$this
->createUsers();
$this
->drupalLogin($this->normalUser);
}
public function tearDown() {
$this
->purgeSubmissions();
parent::tearDown();
}
}