@@ 39-46 (lines=8) @@ | ||
36 | * @depends testStoreMessage |
|
37 | * @covers \jones\wschat\collections\History::getHistory |
|
38 | */ |
|
39 | 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 | } |
@@ 36-42 (lines=7) @@ | ||
33 | * @depends testStoreMessage |
|
34 | * @covers \jones\wschat\components\DbStorage::getHistory |
|
35 | */ |
|
36 | public function testGetHistory() |
|
37 | { |
|
38 | $data = AbstractStorage::factory('pgsql')->getHistory($this->params['chat_id']); |
|
39 | $this->assertNotEmpty($data); |
|
40 | $this->assertEquals(1, sizeof($data), 'Only one message should be in history table'); |
|
41 | $this->assertEquals($this->params['message'], $data[0]['message']); |
|
42 | } |
|
43 | ||
44 | } |
|
45 |