You are here

public function ModerationStateNodeTypeTest::testNotModerated in Workbench Moderation 8.2

A node type without moderation state disabled.

File

src/Tests/ModerationStateNodeTypeTest.php, line 18

Class

ModerationStateNodeTypeTest
Tests moderation state node type integration.

Namespace

Drupal\workbench_moderation\Tests

Code

public function testNotModerated() {
  $this
    ->drupalLogin($this->adminUser);
  $this
    ->createContentTypeFromUI('Not moderated', 'not_moderated');
  $this
    ->assertText('The content type Not moderated has been added.');
  $this
    ->grantUserPermissionToCreateContentOfType($this->adminUser, 'not_moderated');
  $this
    ->drupalGet('node/add/not_moderated');
  $this
    ->assertRaw('Save as unpublished');
  $this
    ->drupalPostForm(NULL, [
    'title[0][value]' => 'Test',
  ], t('Save and publish'));
  $this
    ->assertText('Not moderated Test has been created.');
}