You are here

InstagramEmbedFormatterTest.php in Media entity Instagram 3.x

Same filename and directory in other branches
  1. 8.2 tests/src/Functional/InstagramEmbedFormatterTest.php

File

tests/src/Functional/InstagramEmbedFormatterTest.php
View source
<?php

namespace Drupal\Tests\media_entity_instagram\Functional;

use Drupal\Tests\media\Functional\FieldFormatter\OEmbedFormatterTest;

/**
 * Tests for Instagram embed formatter.
 *
 * @group media_entity_instagram
 */
class InstagramEmbedFormatterTest extends OEmbedFormatterTest {

  /**
   * {@inheritdoc}
   */
  protected function getFixturesDirectory() {
    return drupal_get_path('module', 'media_entity_instagram') . '/tests/fixtures/oembed';
  }

  /**
   * {@inheritdoc}
   */
  public function providerRender() {
    return [
      'Instagram' => [
        'https://instagram.com/p/B2huuS8AQVq',
        'instagram.json',
        [],
        [
          'iframe' => [
            'src' => '/media/oembed?url=https%3A//instagram.com/p/B2huuS8AQVq',
            'width' => '658',
          ],
        ],
      ],
    ];
  }

}

Classes

Namesort descending Description
InstagramEmbedFormatterTest Tests for Instagram embed formatter.