public function ImageFieldMappingTest::testConstruct in FillPDF 5.0.x
Same name and namespace in other branches
- 8.4 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\FieldMappingCode
public function testConstruct() {
// Test valid and invalid instantiations.
$image_field_mapping = new ImageFieldMapping('Dummy image', 'jpg');
self::assertInstanceOf(ImageFieldMapping::class, $image_field_mapping);
$this
->expectException(\InvalidArgumentException::class);
new ImageFieldMapping('Dummy image', 'bmp');
}