Conditions | 1 |
Paths | 1 |
Total Lines | 12 |
Code Lines | 9 |
Lines | 12 |
Ratio | 100 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
39 | View Code Duplication | 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 |
Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.
You can also find more detailed suggestions in the “Code” section of your repository.