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.

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

File

paragraphs/tests/src/Functional/WidgetLegacy/ParagraphsTestBase.php, line 180

Class

ParagraphsTestBase
Base class for tests.

Namespace

Drupal\Tests\paragraphs\Functional\WidgetLegacy

Code

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