You are here

public function AssetMediaFactoryTest::testGetAssetIdFields in Media: Acquia DAM 8

Validate we can get configured asset ID fields.

File

tests/src/Unit/AssetMediaFactoryTest.php, line 160

Class

AssetMediaFactoryTest
Class AssetMediaFactoryTest.

Namespace

Drupal\Tests\media_acquiadam\Unit

Code

public function testGetAssetIdFields() {
  $fields = $this->assetMediaFactory
    ->getAssetIdFields();
  $this
    ->assertArrayHasKey('acquiadam_asset', $fields);
  $this
    ->assertArrayHasKey('acquiadam_image', $fields);
  $this
    ->assertArrayNotHasKey('acquiadam_other', $fields);
  $this
    ->assertEquals('phpunit_asset_id_field', $fields['acquiadam_asset']);
  $this
    ->assertEquals('phpunit_asset_id_field', $fields['acquiadam_image']);
}