You are here

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

Validate we can change the AssetMediaEntityHelper class.

File

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

Class

AssetMediaFactoryTest
Class AssetMediaFactoryTest.

Namespace

Drupal\Tests\media_acquiadam\Unit

Code

public function testGetSetAssetMediaEntityHelperClass() {
  $this
    ->assertEquals(MediaEntityHelper::class, $this->assetMediaFactory
    ->getAssetMediaEntityHelperClass());
  $this->assetMediaFactory
    ->setAssetMediaEntityHelperClass(\Drupal::class);
  $this
    ->assertEquals(\Drupal::class, $this->assetMediaFactory
    ->getAssetMediaEntityHelperClass());
  $this->assetMediaFactory
    ->setAssetMediaEntityHelperClass(MediaEntityHelper::class);
  $this
    ->assertEquals(MediaEntityHelper::class, $this->assetMediaFactory
    ->getAssetMediaEntityHelperClass());
}