You are here

public function AmpSocialPostTest::testGetLibraries in Accelerated Mobile Pages (AMP) 8.3

@covers ::getLibraries

File

tests/src/Unit/AmpSocialPostTest.php, line 41

Class

AmpSocialPostTest
@coversDefaultClass \Drupal\amp\Element\AmpSocialPost

Namespace

Drupal\Tests\amp\Unit

Code

public function testGetLibraries() {
  $processed = AmpSocialPost::getLibraries();
  $this
    ->assertTrue(is_array($processed));
  foreach ($processed as $item) {
    $this
      ->assertEquals(1, preg_match('@([a-z0-9_-]*)(/amp\\.)([a-z0-9_-]*)@', $item, $matches));
  }
}