public function ReplicationEntityTest::testReplication in Deploy - Content Staging 8
Functional test for Replication.
File
- src/
Tests/ ReplicationEntityTest.php, line 21
Class
- ReplicationEntityTest
- Test the replication entity.
Namespace
Drupal\deploy\TestsCode
public function testReplication() {
$this->webUser = $this
->drupalCreateUser([
'administer workspaces',
'administer deployments',
'Deploy to Live',
]);
$this
->drupalLogin($this->webUser);
$this
->drupalPostForm('admin/structure/workspace/2/activate', [], t('Activate'));
$this
->drupalGet('admin/structure/deployment/add');
$deployment = [
'name[0][value]' => 'Test Deployment',
];
$this
->drupalPostForm('admin/structure/deployment/add', $deployment, t('Deploy to Live'));
$this
->drupalGet('admin/structure/deployment');
$this
->assertText($deployment['name[0][value]'], 'Deployment found in list of deployments');
}