You are here

protected function ParagraphsTestBase::removeDefaultParagraphType in Paragraphs 8

Same name in this branch
  1. 8 tests/src/Functional/WidgetLegacy/ParagraphsTestBase.php \Drupal\Tests\paragraphs\Functional\WidgetLegacy\ParagraphsTestBase::removeDefaultParagraphType()
  2. 8 tests/src/Functional/WidgetStable/ParagraphsTestBase.php \Drupal\Tests\paragraphs\Functional\WidgetStable\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 tests/src/Functional/WidgetStable/ParagraphsAddModesTest.php
Tests if setting for default paragraph type is working properly.

File

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.');
}