22 private $objectManager;
28 $this->model = $this->objectManager->create(
29 BulkNotificationManagement::class
36 public function testAcknowledgeBulks()
38 $this->model->acknowledgeBulks([
'bulk-uuid-5']);
40 $acknowledgedBulks = $this->model->getAcknowledgedBulksByUser(1);
41 $this->assertCount(1, $acknowledgedBulks);
43 $acknowledgedBulk = array_pop($acknowledgedBulks);
44 $this->assertEquals(
'bulk-uuid-5', $acknowledgedBulk->getBulkId());
50 public function testIgnoreBulks()
53 $this->model->ignoreBulks([
'bulk-uuid-5']);
55 $acknowledgedBulks = $this->model->getAcknowledgedBulksByUser(1);
56 $this->assertCount(1, $acknowledgedBulks);
58 $acknowledgedBulk = array_pop($acknowledgedBulks);
59 $this->assertEquals(
'bulk-uuid-4', $acknowledgedBulk->getBulkId());
68 $acknowledgedBulks = $this->model->getAcknowledgedBulksByUser(1);
69 $this->assertCount(2, $acknowledgedBulks);
78 $ignoredBulks = $this->model->getIgnoredBulksByUser(1);
79 $this->assertCount(3, $ignoredBulks);
testGetAcknowledgedBulks()
static getObjectManager()