You are here

protected function ParagraphsIsChangedTest::setUp in Paragraphs 8

Overrides KernelTestBase::setUp

File

tests/src/Kernel/ParagraphsIsChangedTest.php, line 33

Class

ParagraphsIsChangedTest
Tests \Drupal\Paragraphs\Entity\Paragraph::isChanged().

Namespace

Drupal\Tests\paragraphs\Kernel

Code

protected function setUp() : void {
  parent::setUp();
  $this
    ->installEntitySchema('user');
  $this
    ->installEntitySchema('paragraph');
  $this
    ->installSchema('system', [
    'sequences',
  ]);
  \Drupal::moduleHandler()
    ->loadInclude('paragraphs', 'install');

  // Create a text paragraph type.
  $paragraph_type = ParagraphsType::create([
    'label' => 'text_paragraph',
    'id' => 'text_paragraph',
  ]);
  $paragraph_type
    ->save();
  $this
    ->addParagraphsField('text_paragraph', 'text', 'string');
}