public function ArticleCreationTest::testCreateArticleWithNoModeration in Thunder 6.1.x
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.3 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()
Test Creation of Article without content moderation.
File
- tests/
src/ FunctionalJavascript/ ArticleCreationTest.php, line 135
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([
'thunder_workflow',
]);
$term = $this
->loadTermByUuid('bfc251bc-de35-467d-af44-1f7a7012b845');
// Try to create an article.
$this
->articleFillNew([
'field_channel' => $term
->id(),
'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');
}