You are here

public function FileMetadataFontTest::testSupportedKeys in File metadata manager 8

Same name and namespace in other branches
  1. 8.2 file_mdm_font/tests/src/Kernel/FileMetadataFontTest.php \Drupal\Tests\file_mdm_font\Kernel\FileMetadataFontTest::testSupportedKeys()

Test 'font' plugin supported keys.

File

file_mdm_font/tests/src/Kernel/FileMetadataFontTest.php, line 84

Class

FileMetadataFontTest
Tests that the file metadata 'font' plugin works properly.

Namespace

Drupal\Tests\file_mdm_font\Kernel

Code

public function testSupportedKeys() {
  $expected_keys = [
    'FontType',
    'FontWeight',
    'Copyright',
    'FontName',
    'FontSubfamily',
    'UniqueID',
    'FullName',
    'Version',
    'PostScriptName',
    'Trademark',
    'Manufacturer',
    'Designer',
    'Description',
    'FontVendorURL',
    'FontDesignerURL',
    'LicenseDescription',
    'LicenseURL',
    'PreferredFamily',
    'PreferredSubfamily',
    'CompatibleFullName',
    'SampleText',
  ];
  $fmdm = $this->container
    ->get('file_metadata_manager');
  $file_md = $fmdm
    ->uri(drupal_get_path('module', 'image_effects') . '/tests/fonts/LinLibertineTTF_5.3.0_2012_07_02/LinLibertine_Rah.ttf');
  $this
    ->assertEquals($expected_keys, $file_md
    ->getSupportedKeys('font'));
}