You are here

protected function AuthorReferenceFormatterTest::setUp in Facebook Instant Articles 3.x

Same name and namespace in other branches
  1. 8.2 tests/src/Kernel/Plugin/Field/FieldFormatter/AuthorReferenceFormatterTest.php \Drupal\Tests\fb_instant_articles\Kernel\Plugin\Field\FieldFormatter\AuthorReferenceFormatterTest::setUp()

Overrides FormatterTestBase::setUp

File

tests/src/Kernel/Plugin/Field/FieldFormatter/AuthorReferenceFormatterTest.php, line 27

Class

AuthorReferenceFormatterTest
Test the instant article author reference field formatter.

Namespace

Drupal\Tests\fb_instant_articles\Kernel\Plugin\Field\FieldFormatter

Code

protected function setUp() : void {
  parent::setUp();
  $this
    ->installSchema('system', 'sequences');
  $this
    ->installConfig([
    'user',
  ]);
  $this
    ->installEntitySchema('user');

  // Setup entity view display with default settings.
  $this->display
    ->setComponent($this->fieldName, [
    'type' => 'fbia_author_reference',
    'settings' => [],
  ]);
  $this->display
    ->save();
}