public function MediaEntityHelperTest::testGetAssetFileField in Media: Acquia DAM 8
Validates we can get the file field assets data is stored in.
File
- tests/
src/ Unit/ MediaEntityHelperTest.php, line 84
Class
- MediaEntityHelperTest
- Testing of the Media Entity helper class.
Namespace
Drupal\Tests\media_acquiadam\UnitCode
public function testGetAssetFileField() {
$this
->assertEquals('phpunit_file_field', $this
->getNewMediaEntityHelper()
->getAssetFileField());
/** @var \Drupal\media\MediaInterface|\PHPUnit\Framework\MockObject\MockObject $media */
$media = $this
->getMockBuilder(MediaInterface::class)
->disableOriginalConstructor()
->getMock();
$this
->assertFalse($this
->getNewMediaEntityHelper($media)
->getAssetFileField());
}