Conditions | 1 |
Paths | 1 |
Total Lines | 8 |
Code Lines | 6 |
Lines | 8 |
Ratio | 100 % |
Changes | 1 | ||
Bugs | 0 | Features | 1 |
1 | <?php |
||
39 | View Code Duplication | public function testGetHistory() |
|
|
|||
40 | { |
||
41 | $data = AbstractStorage::factory('mongodb')->getHistory($this->params['chat_id']); |
||
42 | $this->assertNotEmpty($data); |
||
43 | $this->assertEquals(1, sizeof($data), 'Only one message should be in history collection'); |
||
44 | $this->assertEquals($this->params['message'], $data[0]['message']); |
||
45 | $this->clearCollection(); |
||
46 | } |
||
47 | } |
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.