public function ParagraphsTest::setUp

Same name in this branch
  1. 8.x-1.x paragraphs/tests/src/Functional/Feeds/Target/ParagraphsTest.php \Drupal\Tests\paragraphs\Functional\Feeds\Target\ParagraphsTest::setUp()
  2. 8.x-1.x paragraphs/tests/src/Kernel/Feeds/Target/ParagraphsTest.php \Drupal\Tests\paragraphs\Kernel\Feeds\Target\ParagraphsTest::setUp()

File

paragraphs/tests/src/Kernel/Feeds/Target/ParagraphsTest.php, line 43

Class

ParagraphsTest
@coversDefaultClass \Drupal\paragraphs\Feeds\Target\Paragraphs @group paragraphs

Namespace

Drupal\Tests\paragraphs\Kernel\Feeds\Target

Code

public function setUp() : void {
  parent::setUp();
  $this
    ->installEntitySchema('paragraph');

  // Create feed type.
  $this->feedType = $this
    ->createFeedTypeForCsv([
    'guid' => 'guid',
    'title' => 'title',
    'alpha' => 'alpha',
  ]);

  // Add a Paragraph field to the article content type.
  $this
    ->addParagraphsField('article', 'field_paragraphs', 'node');
  $this
    ->addParagraphsType('test_paragraph');
  $this
    ->addFieldtoParagraphType('test_paragraph', 'field_text', 'text');
  drupal_flush_all_caches();
}