◆ testEntryCanBeAddedToQueue()
ilCertificateQueueRepositoryTest::testEntryCanBeAddedToQueue |
( |
| ) |
|
Definition at line 26 of file ilCertificateQueueRepositoryTest.php.
References $timestamp.
28 $databaseMock = $this->createMock(ilDBInterface::class);
30 $loggerMock = $this->getMockBuilder(ilLogger::class)
31 ->disableOriginalConstructor()
36 $databaseMock->expects($this->once())
40 $loggerMock->expects($this->atLeastOnce())
43 $loggerMock->expects($this->atLeastOnce())
46 $databaseMock->expects($this->once())
51 'id' => [
'integer', 20],
52 'obj_id' => [
'integer', 10],
53 'usr_id' => [
'integer', 500],
54 'adapter_class' => [
'text',
'SomeClass'],
55 'state' => [
'text',
'SomeState'],
56 'started_timestamp' => [
'integer',
$timestamp],
57 'template_id' => [
'integer', 10000]
72 $repository->addToQueue($queueEntry);
foreach($mandatory_scripts as $file) $timestamp
◆ testFetchAllEntriesFromQueue()
ilCertificateQueueRepositoryTest::testFetchAllEntriesFromQueue |
( |
| ) |
|
Definition at line 100 of file ilCertificateQueueRepositoryTest.php.
References ILIAS\Survey\Mode\getId().
102 $databaseMock = $this->createMock(ilDBInterface::class);
104 $loggerMock = $this->getMockBuilder(ilLogger::class)
105 ->disableOriginalConstructor()
108 $loggerMock->expects($this->atLeastOnce())
111 $loggerMock->expects($this->atLeastOnce())
114 $databaseMock->expects($this->once())
117 $databaseMock->expects($this->exactly(3))
118 ->method(
'fetchAssoc')
119 ->willReturnOnConsecutiveCalls(
124 'adapter_class' =>
'SomeClass',
125 'state' =>
'SomeState',
126 'template_id' => 1000,
127 'started_timestamp' => 123456789
133 'adapter_class' =>
'SomeClass',
134 'state' =>
'SomeState',
135 'template_id' => 1000,
136 'started_timestamp' => 123456789
142 $entries = $repository->getAllEntriesFromQueue();
144 $this->assertSame(10, $entries[0]->
getId());
145 $this->assertSame(20, $entries[1]->
getId());
◆ testRemoveFromQueue()
ilCertificateQueueRepositoryTest::testRemoveFromQueue |
( |
| ) |
|
Definition at line 75 of file ilCertificateQueueRepositoryTest.php.
77 $databaseMock = $this->createMock(ilDBInterface::class);
79 $loggerMock = $this->getMockBuilder(ilLogger::class)
80 ->disableOriginalConstructor()
83 $loggerMock->expects($this->atLeastOnce())
86 $databaseMock->expects($this->once())
91 $databaseMock->expects($this->once())
92 ->method(
'manipulate')
93 ->with(
'DELETE FROM il_cert_cron_queue WHERE id = 30');
97 $repository->removeFromQueue(30);
The documentation for this class was generated from the following file: