1 <?php declare(strict_types=1);
29 $this->languageMock = $this->getMockBuilder(ilLanguage::class)
30 ->disableOriginalConstructor()
33 $this->dicMock = $this->getMockBuilder(Container::class)
34 ->disableOriginalConstructor()
37 $this->loggerMock = $this->getMockBuilder(ilLogger::class)
38 ->disableOriginalConstructor()
48 $taskManager = $this->getMockBuilder(BasicTaskManager::class)
50 ->disableOriginalConstructor()
54 ->expects($this->exactly(1))
58 ->setMethods([
'createTask'])
59 ->disableOriginalConstructor()
62 $backgroundTask = $this->getMockbuilder(ilMailDeliveryJob::class)
63 ->disableOriginalConstructor()
66 $backgroundTask->expects($this->any())->method(
'unfoldTask')
70 ->expects($this->exactly(2))
71 ->method(
'createTask')
72 ->willReturn($backgroundTask);
101 $contextParameters = [];
117 $taskManager = $this->getMockBuilder(BasicTaskManager::class)
118 ->setMethods([
'run'])
119 ->disableOriginalConstructor()
123 ->expects($this->exactly(1))
126 $taskFactory = $this->getMockBuilder(TaskFactory::class)
127 ->setMethods([
'createTask'])
128 ->disableOriginalConstructor()
131 $backgroundTask = $this->getMockbuilder(ilMailDeliveryJob::class)
132 ->disableOriginalConstructor()
136 ->expects($this->any())
137 ->method(
'unfoldTask')
141 ->expects($this->exactly(2))
142 ->method(
'createTask')
143 ->willReturn($backgroundTask);
152 'SomeAnonymousUserId' 155 $mailValueObjects = [];
159 'somebody@iliase.de',
163 'Dear Steve, great!',
169 'somebodyelse@iliase.de',
173 'Steve, Steve, Steve. Wait that is not Steve',
179 $contextParameters = [];
195 $taskManager = $this->getMockBuilder(BasicTaskManager::class)
196 ->setMethods([
'run'])
197 ->disableOriginalConstructor()
201 ->expects($this->exactly(2))
204 $taskFactory = $this->getMockBuilder(TaskFactory::class)
205 ->setMethods([
'createTask'])
206 ->disableOriginalConstructor()
209 $backgroundTask = $this->getMockbuilder(ilMailDeliveryJob::class)
210 ->disableOriginalConstructor()
214 ->expects($this->any())
215 ->method(
'unfoldTask')
219 ->expects($this->exactly(4))
220 ->method(
'createTask')
221 ->willReturn($backgroundTask);
230 'SomeAnonymousUserId' 233 $mailValueObjects = [];
237 'somebody@iliase.de',
241 'Dear Steve, great!',
247 'somebodyelse@iliase.de',
251 'Steve, Steve, Steve. Wait that is not Steve',
257 'somebody@iliase.de',
261 'Hey Alan! Alan! Alan!',
267 $contextParameters = [];
284 $this->expectException(ilException::class);
286 $taskManager = $this->getMockBuilder(BasicTaskManager::class)
287 ->setMethods([
'run'])
288 ->disableOriginalConstructor()
292 ->expects($this->never())
295 $taskFactory = $this->getMockBuilder(TaskFactory::class)
296 ->setMethods([
'createTask'])
297 ->disableOriginalConstructor()
300 $backgroundTask = $this->getMockbuilder(ilMailDeliveryJob::class)
301 ->disableOriginalConstructor()
305 ->expects($this->any())
306 ->method(
'unfoldTask')
310 ->expects($this->never())
311 ->method(
'createTask')
312 ->willReturn($backgroundTask);
321 'SomeAnonymousUserId' 324 $mailValueObjects = [];
328 'somebody@iliase.de',
332 'Dear Steve, great!',
338 'somebodyelse@iliase.de',
342 'Steve, Steve, Steve. Wait that is not Steve',
346 $mailValueObjects[] =
'This should fail';
350 $contextParameters = [];
Class ChatMainBarProvider .
Class ilMailTaskProcessorTest.
testRunHasWrongTypeAndWillResultInException()
testRunThreeTasksInDifferentBuckets()