You are here

public function ProviderUrlParseTest::urlsWithExpectedIds in Video Embed Instagram 8

A data provider for URL parsing test cases.

Return value

array An array of test cases.

File

tests/src/Unit/ProviderUrlParseTest.php, line 35
Contains Drupal\Tests\video_embed_instagram\Unit\ProviderUrlParseTest.

Class

ProviderUrlParseTest
Test that URL parsing for the provider is functioning.

Namespace

Drupal\Tests\video_embed_instagram\Unit

Code

public function urlsWithExpectedIds() {
  return [
    [
      'https://www.instagram.com/p/BDAtHPYSeO4/',
      'BDAtHPYSeO4',
    ],
    [
      'http://www.instagram.com/p/BDAtHPYSeO4/',
      'BDAtHPYSeO4',
    ],
    [
      'http://www.instagram.com/p/BDAtHPYSeO4',
      'BDAtHPYSeO4',
    ],
    [
      'https://www.instagram.com/p/BDAtHPYSeO4',
      'BDAtHPYSeO4',
    ],
    [
      'https://www.instagram.com/p/BFElYdqjJwa/?taken-by=9gag',
      'BFElYdqjJwa',
    ],
  ];
}