public function GalleryBundleTest::testMediaBundleCreationFromModule in D7 Media 8
Tests gallery media bundle creation from config files.
File
- src/
Tests/ GalleryBundleTest.php, line 65
Class
- GalleryBundleTest
- Ensures that media bundle for gallery can be created.
Namespace
Drupal\media\TestsCode
public function testMediaBundleCreationFromModule() {
$type_configuration = [
'source_field' => 'field_slide',
];
$this
->assertTrue((bool) $this->testBundle, 'The media bundle from default configuration has been created in the database.');
$this
->assertEqual($this->testBundle
->get('label'), 'Gallery', 'Correct label detected.');
$this
->assertEqual($this->testBundle
->get('description'), 'Use Gallery for creating a collection of different media items.', 'Correct description detected.');
$this
->assertEqual($this->testBundle
->get('type'), 'slideshow', 'Correct plugin ID detected.');
$this
->assertEqual($this->testBundle
->get('type_configuration'), $type_configuration, 'Type configuration correct.');
$this
->assertEqual($this->testBundle
->get('field_map'), [], 'Correct field map detected.');
}