| @@ 50-62 (lines=13) @@ | ||
| 47 | /** |
|
| 48 | * Tests image media bundle creation from config files. |
|
| 49 | */ |
|
| 50 | public function testMediaBundleCreationFromModule() { |
|
| 51 | $type_configuration = [ |
|
| 52 | 'source_field' => 'field_image', |
|
| 53 | 'gather_exif' => false |
|
| 54 | ]; |
|
| 55 | ||
| 56 | $this->assertTrue((bool) $this->testBundle, 'The media bundle from default configuration has been created in the database.'); |
|
| 57 | $this->assertEqual($this->testBundle->get('label'), 'Image', 'Correct label detected.'); |
|
| 58 | $this->assertEqual($this->testBundle->get('description'), 'Use Image for uploading locally hosted images.', 'Correct description detected.'); |
|
| 59 | $this->assertEqual($this->testBundle->get('type'), 'image', 'Correct plugin ID detected.'); |
|
| 60 | $this->assertEqual($this->testBundle->get('type_configuration'), $type_configuration, 'Type configuration correct.'); |
|
| 61 | $this->assertEqual($this->testBundle->get('field_map'), [], 'Correct field map detected.'); |
|
| 62 | } |
|
| 63 | ||
| 64 | /** |
|
| 65 | * Tests item creation and thumbnail |
|
| @@ 39-50 (lines=12) @@ | ||
| 36 | /** |
|
| 37 | * Tests video media bundle creation from config files. |
|
| 38 | */ |
|
| 39 | public function testMediaBundleCreationFromModule() { |
|
| 40 | $type_configuration = [ |
|
| 41 | 'source_field' => 'field_media_video_embed_field' |
|
| 42 | ]; |
|
| 43 | ||
| 44 | $this->assertTrue((bool) $this->testBundle, 'The media bundle from default configuration has been created in the database.'); |
|
| 45 | $this->assertEqual($this->testBundle->get('label'), 'Video', 'Correct label detected.'); |
|
| 46 | $this->assertEqual($this->testBundle->get('description'), 'Use Video for embedding videos hosted by YouTube, Vimeo, or some other provider.', 'Correct description detected.'); |
|
| 47 | $this->assertEqual($this->testBundle->get('type'), 'video_embed_field', 'Correct plugin ID detected.'); |
|
| 48 | $this->assertEqual($this->testBundle->get('type_configuration'), $type_configuration, 'Type configuration correct.'); |
|
| 49 | $this->assertEqual($this->testBundle->get('field_map'), [], 'Correct field map detected.'); |
|
| 50 | } |
|
| 51 | } |
|
| 52 | ||