protected function ParagraphsTestBase::removeDefaultParagraphType

Same name in this branch
  1. 8.x-1.x paragraphs/tests/src/Functional/WidgetStable/ParagraphsTestBase.php \Drupal\Tests\paragraphs\Functional\WidgetStable\ParagraphsTestBase::removeDefaultParagraphType()
  2. 8.x-1.x paragraphs/tests/src/Functional/WidgetLegacy/ParagraphsTestBase.php \Drupal\Tests\paragraphs\Functional\WidgetLegacy\ParagraphsTestBase::removeDefaultParagraphType()

Removes the default paragraph type.

Parameters

$content_type: Content type name that contains the paragraphs field.

Overrides ParagraphsTestBase::removeDefaultParagraphType

1 call to ParagraphsTestBase::removeDefaultParagraphType()
ParagraphsAddModesTest::testSettingDefaultParagraphType in paragraphs/tests/src/Functional/WidgetStable/ParagraphsAddModesTest.php
Tests if setting for default paragraph type is working properly.

File

paragraphs/tests/src/Functional/WidgetStable/ParagraphsTestBase.php, line 41

Class

ParagraphsTestBase
Base class for tests.

Namespace

Drupal\Tests\paragraphs\Functional\WidgetStable

Code

protected function removeDefaultParagraphType($content_type) {
  $this
    ->drupalGet('node/add/' . $content_type);
  $this
    ->submitForm([], 'Remove');
  $this
    ->assertSession()
    ->pageTextNotContains('No paragraphs added yet.');
}