Error message

  • Warning: count(): Parameter must be an array or an object that implements Countable in _api_make_match_member_link() (line 1230 of /home/projects/api/www/sites/all/modules/api/api.formatting.inc).
  • Warning: count(): Parameter must be an array or an object that implements Countable in _api_make_match_member_link() (line 1230 of /home/projects/api/www/sites/all/modules/api/api.formatting.inc).

protected function ParagraphsIsChangedTest::setUp

File

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