Code Duplication    Length = 12-13 lines in 2 locations

src/Tests/GalleryBundleTest.php 1 location

@@ 55-66 (lines=12) @@
52
  /**
53
   * Tests gallery media bundle creation from config files.
54
   */
55
  public function testMediaBundleCreationFromModule() {
56
    $type_configuration = [
57
      'source_field' => 'field_slide',
58
    ];
59
60
    $this->assertTrue((bool) $this->testBundle, 'The media bundle from default configuration has been created in the database.');
61
    $this->assertEqual($this->testBundle->get('label'), 'Gallery', 'Correct label detected.');
62
    $this->assertEqual($this->testBundle->get('description'), 'Use Gallery for creating a collection of different media items.', 'Correct description detected.');
63
    $this->assertEqual($this->testBundle->get('type'), 'slideshow', 'Correct plugin ID detected.');
64
    $this->assertEqual($this->testBundle->get('type_configuration'), $type_configuration, 'Type configuration correct.');
65
    $this->assertEqual($this->testBundle->get('field_map'), [], 'Correct field map detected.');
66
  }
67
68
  /**
69
   * Tests thumbnail of the gallery item.

src/Tests/ImageBundleTest.php 1 location

@@ 56-68 (lines=13) @@
53
  /**
54
   * Tests image media bundle creation from config files.
55
   */
56
  public function testMediaBundleCreationFromModule() {
57
    $type_configuration = [
58
      'source_field' => 'field_image',
59
      'gather_exif' => FALSE,
60
    ];
61
62
    $this->assertTrue((bool) $this->testBundle, 'The media bundle from default configuration has been created in the database.');
63
    $this->assertEqual($this->testBundle->get('label'), 'Image', 'Correct label detected.');
64
    $this->assertEqual($this->testBundle->get('description'), 'Use Image for uploading locally hosted images.', 'Correct description detected.');
65
    $this->assertEqual($this->testBundle->get('type'), 'image', 'Correct plugin ID detected.');
66
    $this->assertEqual($this->testBundle->get('type_configuration'), $type_configuration, 'Type configuration correct.');
67
    $this->assertEqual($this->testBundle->get('field_map'), [], 'Correct field map detected.');
68
  }
69
70
  /**
71
   * Tests item creation and thumbnail.