You are here

public function ImageFieldMappingTest::testConstruct in FillPDF 8.4

Same name and namespace in other branches
  1. 5.0.x tests/src/Unit/FieldMapping/ImageFieldMappingTest.php \Drupal\Tests\fillpdf\Unit\FieldMapping\ImageFieldMappingTest::testConstruct()

Test the constructor.

File

tests/src/Unit/FieldMapping/ImageFieldMappingTest.php, line 19

Class

ImageFieldMappingTest
Test the ImageFieldMapping class.

Namespace

Drupal\Tests\fillpdf\Unit\FieldMapping

Code

public function testConstruct() {

  // Test valid and invalid instantiations.
  $image_field_mapping = new ImageFieldMapping('Dummy image', 'jpg');
  self::assertInstanceOf(ImageFieldMapping::class, $image_field_mapping);
  $this
    ->setExpectedException(\InvalidArgumentException::class);
  new ImageFieldMapping('Dummy image', 'bmp');
}