You are here

public function AcquiadamAssetTest::testGetMetadata in Media: Acquia DAM 8

Validate that we can get generated metadata.

File

tests/src/Unit/AcquiadamAssetTest.php, line 45

Class

AcquiadamAssetTest
Tests to validate that the Media source plugin works as expected.

Namespace

Drupal\Tests\media_acquiadam\Unit

Code

public function testGetMetadata() {
  $media = $this
    ->getMockedMediaEntity($this
    ->getAssetData()->id);
  $this
    ->assertEquals('media:acquiadam:' . $media
    ->uuid(), $this->acquiadamMediaSource
    ->getMetadata($media, 'default_name'));
  $this
    ->assertEquals($this
    ->getMockedFileEntity()
    ->id(), $this->acquiadamMediaSource
    ->getMetadata($media, 'file'));
}