DisableEntityTypesTest.php in Multiversion 8.2
File
tests/src/Functional/DisableEntityTypesTest.php
View source
<?php
namespace Drupal\Tests\multiversion\Functional;
use Drupal\Tests\BrowserTestBase;
class DisableEntityTypesTest extends BrowserTestBase {
public static $modules = [
'key_value',
'multiversion',
'workspaces',
'serialization',
'node',
'views',
'views_ui',
];
public function testDisableEntityTypes() {
\Drupal::service('multiversion.manager')
->disableEntityTypes();
$this
->drupalCreateContentType([
'type' => 'page',
'name' => 'Page',
]);
$this
->drupalLogin($this->rootUser);
$this
->drupalGet('node/add/page');
$this
->drupalPostForm(NULL, [
'title[0][value]' => 'Node title test',
'body[0][value]' => 'This is node content',
], t('Save'));
$this
->drupalGet('admin/content');
$this
->assertSession()
->pageTextContains('Node title test');
}
}