| @@ 64-76 (lines=13) @@ | ||
| 61 | /** |
|
| 62 | * Tests image media bundle creation from config files. |
|
| 63 | */ |
|
| 64 | public function testMediaBundleCreationFromModule() { |
|
| 65 | $type_configuration = [ |
|
| 66 | 'source_field' => 'field_image', |
|
| 67 | 'gather_exif' => FALSE, |
|
| 68 | ]; |
|
| 69 | ||
| 70 | $this->assertTrue((bool) $this->testBundle, 'The media bundle from default configuration has been created in the database.'); |
|
| 71 | $this->assertEqual($this->testBundle->get('label'), 'Image', 'Correct label detected.'); |
|
| 72 | $this->assertEqual($this->testBundle->get('description'), 'Use Image for uploading locally hosted images.', 'Correct description detected.'); |
|
| 73 | $this->assertEqual($this->testBundle->get('type'), 'image', 'Correct plugin ID detected.'); |
|
| 74 | $this->assertEqual($this->testBundle->get('type_configuration'), $type_configuration, 'Type configuration correct.'); |
|
| 75 | $this->assertEqual($this->testBundle->get('field_map'), [], 'Correct field map detected.'); |
|
| 76 | } |
|
| 77 | ||
| 78 | /** |
|
| 79 | * Tests item creation and thumbnail. |
|
| @@ 64-75 (lines=12) @@ | ||
| 61 | /** |
|
| 62 | * Tests gallery media bundle creation from config files. |
|
| 63 | */ |
|
| 64 | public function testMediaBundleCreationFromModule() { |
|
| 65 | $type_configuration = [ |
|
| 66 | 'source_field' => 'field_slide', |
|
| 67 | ]; |
|
| 68 | ||
| 69 | $this->assertTrue((bool) $this->testBundle, 'The media bundle from default configuration has been created in the database.'); |
|
| 70 | $this->assertEqual($this->testBundle->get('label'), 'Gallery', 'Correct label detected.'); |
|
| 71 | $this->assertEqual($this->testBundle->get('description'), 'Use Gallery for creating a collection of different media items.', 'Correct description detected.'); |
|
| 72 | $this->assertEqual($this->testBundle->get('type'), 'slideshow', 'Correct plugin ID detected.'); |
|
| 73 | $this->assertEqual($this->testBundle->get('type_configuration'), $type_configuration, 'Type configuration correct.'); |
|
| 74 | $this->assertEqual($this->testBundle->get('field_map'), [], 'Correct field map detected.'); |
|
| 75 | } |
|
| 76 | ||
| 77 | /** |
|
| 78 | * Tests thumbnail of the gallery item. |
|