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