You are here

public function AssetMetadataHelperTest::testGetMetadataAttributeLabels in Media: Acquia DAM 8

Test that all basic attributes are set and XMP metadata gets set.

File

tests/src/Unit/AssetMetadataHelperTest.php, line 63

Class

AssetMetadataHelperTest
Tests integration of the AssetMetadataHelper service.

Namespace

Drupal\Tests\media_acquiadam\Unit

Code

public function testGetMetadataAttributeLabels() {
  $attributes = $this->assetMetadataHelper
    ->getMetadataAttributeLabels();
  $this
    ->assertArrayHasKey('colorspace', $attributes);
  $this
    ->assertArrayHasKey('datecaptured', $attributes);
  $this
    ->assertArrayHasKey('datecreated', $attributes);
  $this
    ->assertArrayHasKey('datemodified', $attributes);
  $this
    ->assertArrayHasKey('description', $attributes);
  $this
    ->assertArrayHasKey('file', $attributes);
  $this
    ->assertArrayHasKey('filename', $attributes);
  $this
    ->assertArrayHasKey('filesize', $attributes);
  $this
    ->assertArrayHasKey('filetype', $attributes);
  $this
    ->assertArrayHasKey('folderID', $attributes);
  $this
    ->assertArrayHasKey('height', $attributes);
  $this
    ->assertArrayHasKey('status', $attributes);
  $this
    ->assertArrayHasKey('type', $attributes);
  $this
    ->assertArrayHasKey('id', $attributes);
  $this
    ->assertArrayHasKey('version', $attributes);
  $this
    ->assertArrayHasKey('width', $attributes);
  $this
    ->assertArrayNotHasKey('missing_attribute', $attributes);
  $this
    ->assertArrayNotHasKey('xmp_missing_xmp_1', $attributes);
}