‪TYPO3CMS  10.4
RecordHistoryTest.php
Go to the documentation of this file.
1 <?php
2 
3 declare(strict_types=1);
4 
5 /*
6  * This file is part of the TYPO3 CMS project.
7  *
8  * It is free software; you can redistribute it and/or modify it under
9  * the terms of the GNU General Public License, either version 2
10  * of the License, or any later version.
11  *
12  * For the full copyright and license information, please read the
13  * LICENSE.txt file that was distributed with this source code.
14  *
15  * The TYPO3 project - inspiring people to share!
16  */
17 
19 
21 use TYPO3\TestingFramework\Core\Functional\FunctionalTestCase;
22 
23 class ‪RecordHistoryTest extends FunctionalTestCase
24 {
28  private ‪$subject;
29 
33  protected function ‪setUp(): void
34  {
35  parent::setUp();
36  $this->importDataSet(__DIR__ . '/../Fixtures/sys_history.xml');
37  $this->subject = new ‪RecordHistory();
38  }
39 
41  {
42  return [
43  'da625644-8e50-47ee-8c11-bb19552a79e4' => ['da625644-8e50-47ee-8c11-bb19552a79e4', 2],
44  '3479dc73-7bc8-4d3b-a8bc-0370a68cedd2' => ['3479dc73-7bc8-4d3b-a8bc-0370a68cedd2', 1],
45  ];
46  }
47 
54  public function ‪findEventsForCorrelationWorksAsExpected(string $correlationId, int $amountOfEntries): void
55  {
56  self::assertCount($amountOfEntries, $this->subject->findEventsForCorrelation($correlationId));
57  }
58 }
‪TYPO3\CMS\Backend\Tests\Functional\History\RecordHistoryTest\setUp
‪setUp()
Definition: RecordHistoryTest.php:32
‪TYPO3\CMS\Backend\Tests\Functional\History\RecordHistoryTest\$subject
‪RecordHistory $subject
Definition: RecordHistoryTest.php:27
‪TYPO3\CMS\Backend\Tests\Functional\History\RecordHistoryTest\findEventsForCorrelationWorksAsExpectedDataProvider
‪findEventsForCorrelationWorksAsExpectedDataProvider()
Definition: RecordHistoryTest.php:39
‪TYPO3\CMS\Backend\Tests\Functional\History
Definition: RecordHistoryStoreTest.php:18
‪TYPO3\CMS\Backend\Tests\Functional\History\RecordHistoryTest
Definition: RecordHistoryTest.php:24
‪TYPO3\CMS\Backend\History\RecordHistory
Definition: RecordHistory.php:33
‪TYPO3\CMS\Backend\Tests\Functional\History\RecordHistoryTest\findEventsForCorrelationWorksAsExpected
‪findEventsForCorrelationWorksAsExpected(string $correlationId, int $amountOfEntries)
Definition: RecordHistoryTest.php:53