1 | <?php |
||
14 | class MessageMapperTest extends \PHPUnit_Framework_TestCase { |
||
15 | |||
16 | /** |
||
17 | * @var \OCA\Chat\App\Container |
||
18 | */ |
||
19 | public $container; |
||
20 | |||
21 | /** |
||
22 | * @var \OCA\Chat\OCH\Db\MessageMapper |
||
23 | */ |
||
24 | public $messageMapper; |
||
25 | |||
26 | /** |
||
27 | * @var \OCA\Chat\OCH\Db\UserMapper |
||
28 | */ |
||
29 | public $userMapper; |
||
30 | |||
31 | |||
32 | public function setUp(){ |
||
37 | |||
38 | public function messageProvider(){ |
||
65 | |||
66 | /** |
||
67 | * Test if only messages are received send later than we joined AND later than $startpoint = 8 |
||
68 | * @dataProvider messageProvider |
||
69 | * @param $msgs array() |
||
70 | * @param $convId string |
||
71 | * @param $user \OCA\Chat\OCH\Db\User; |
||
72 | */ |
||
73 | public function testGetMessagesByConvIdWitStartPoint($msgs, $convId, $user){ |
||
88 | |||
89 | /** |
||
90 | * Test if only messages are received send later than we joined |
||
91 | * @dataProvider messageProvider |
||
92 | * @param $msgs array() |
||
93 | * @param $convId string |
||
94 | * @param $user \OCA\Chat\OCH\Db\User; |
||
95 | */ |
||
96 | public function testGetMessagesByConvIdWithoutStartPoint($msgs, $convId, $user){ |
||
111 | |||
112 | |||
113 | /** |
||
114 | * Remove all records from the table so future test can run without problems |
||
115 | */ |
||
116 | public function tearDown(){ |
||
123 | |||
124 | |||
125 | |||
126 | } |