ReplicationEntityTest.php in Deploy - Content Staging 8
File
src/Tests/ReplicationEntityTest.php
View source
<?php
namespace Drupal\deploy\Tests;
use Drupal\simpletest\WebTestBase;
class ReplicationEntityTest extends WebTestBase {
protected $strictConfigSchema = FALSE;
public static $modules = [
'deploy',
];
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');
}
}