public function ArticleCreationTest::testCreateArticleWithNoModeration in Thunder 8.3
Same name and namespace in other branches
- 8.5 tests/src/FunctionalJavascript/ArticleCreationTest.php \Drupal\Tests\thunder\FunctionalJavascript\ArticleCreationTest::testCreateArticleWithNoModeration()
- 8.2 tests/src/FunctionalJavascript/ArticleCreationTest.php \Drupal\Tests\thunder\FunctionalJavascript\ArticleCreationTest::testCreateArticleWithNoModeration()
- 8.4 tests/src/FunctionalJavascript/ArticleCreationTest.php \Drupal\Tests\thunder\FunctionalJavascript\ArticleCreationTest::testCreateArticleWithNoModeration()
- 6.2.x tests/src/FunctionalJavascript/ArticleCreationTest.php \Drupal\Tests\thunder\FunctionalJavascript\ArticleCreationTest::testCreateArticleWithNoModeration()
- 6.0.x tests/src/FunctionalJavascript/ArticleCreationTest.php \Drupal\Tests\thunder\FunctionalJavascript\ArticleCreationTest::testCreateArticleWithNoModeration()
- 6.1.x tests/src/FunctionalJavascript/ArticleCreationTest.php \Drupal\Tests\thunder\FunctionalJavascript\ArticleCreationTest::testCreateArticleWithNoModeration()
Test Creation of Article without content moderation.
File
- tests/
src/ FunctionalJavascript/ ArticleCreationTest.php, line 125
Class
- ArticleCreationTest
- Tests the article creation.
Namespace
Drupal\Tests\thunder\FunctionalJavascriptCode
public function testCreateArticleWithNoModeration() {
// Delete all the articles so we can disable content moderation.
foreach (\Drupal::entityTypeManager()
->getStorage('node')
->loadByProperties([
'type' => 'article',
]) as $node) {
$node
->delete();
}
\Drupal::service('module_installer')
->uninstall([
'content_moderation',
]);
// Try to create an article.
$this
->articleFillNew([
'field_channel' => 1,
'title[0][value]' => 'Test article',
'field_seo_title[0][value]' => 'Massive gaining seo traffic text',
]);
$this
->clickSave();
$this
->assertPageTitle('Massive gaining seo traffic text');
$this
->assertSession()
->pageTextContains('Test article');
}