‪TYPO3CMS  10.4
LogEntryTest.php
Go to the documentation of this file.
1 <?php
2 
3 /*
4  * This file is part of the TYPO3 CMS project.
5  *
6  * It is free software; you can redistribute it and/or modify it under
7  * the terms of the GNU General Public License, either version 2
8  * of the License, or any later version.
9  *
10  * For the full copyright and license information, please read the
11  * LICENSE.txt file that was distributed with this source code.
12  *
13  * The TYPO3 project - inspiring people to share!
14  */
15 
17 
19 use TYPO3\TestingFramework\Core\Unit\UnitTestCase;
20 
24 class ‪LogEntryTest extends UnitTestCase
25 {
29  protected ‪$subject;
30 
31  protected function ‪setUp(): void
32  {
33  parent::setUp();
34  $this->subject = new ‪LogEntry();
35  }
36 
41  {
42  self::assertSame([], $this->subject->getLogData());
43  }
44 
49  {
50  $this->subject->setLogData('');
51  self::assertSame([], $this->subject->getLogData());
52  }
53 
58  {
59  $this->subject->setLogData('foo bar');
60  self::assertSame([], $this->subject->getLogData());
61  }
62 
67  {
68  $logData = ['foo', 'bar'];
69  $this->subject->setLogData(serialize($logData));
70  self::assertSame($logData, $this->subject->getLogData());
71  }
72 
77  {
78  $this->subject->setLogData(new \stdClass());
79  self::assertSame([], $this->subject->getLogData());
80  }
81 }
‪TYPO3\CMS\Belog\Tests\Unit\Domain\Model\LogEntryTest\getLogDataForSerializedArrayReturnsThatArray
‪getLogDataForSerializedArrayReturnsThatArray()
Definition: LogEntryTest.php:65
‪TYPO3\CMS\Belog\Tests\Unit\Domain\Model\LogEntryTest
Definition: LogEntryTest.php:25
‪TYPO3\CMS\Belog\Tests\Unit\Domain\Model\LogEntryTest\$subject
‪TYPO3 CMS Belog Domain Model LogEntry $subject
Definition: LogEntryTest.php:28
‪TYPO3\CMS\Belog\Tests\Unit\Domain\Model\LogEntryTest\getLogDataForSerializedObjectReturnsEmptyArray
‪getLogDataForSerializedObjectReturnsEmptyArray()
Definition: LogEntryTest.php:75
‪TYPO3\CMS\Belog\Tests\Unit\Domain\Model\LogEntryTest\getLogDataForEmptyStringLogDataReturnsEmptyArray
‪getLogDataForEmptyStringLogDataReturnsEmptyArray()
Definition: LogEntryTest.php:47
‪TYPO3\CMS\Belog\Tests\Unit\Domain\Model\LogEntryTest\getLogDataInitiallyReturnsEmptyArray
‪getLogDataInitiallyReturnsEmptyArray()
Definition: LogEntryTest.php:39
‪TYPO3\CMS\Belog\Tests\Unit\Domain\Model
Definition: ConstraintTest.php:16
‪TYPO3\CMS\Belog\Domain\Model\LogEntry
Definition: LogEntry.php:28
‪TYPO3\CMS\Belog\Tests\Unit\Domain\Model\LogEntryTest\setUp
‪setUp()
Definition: LogEntryTest.php:30
‪TYPO3\CMS\Belog\Tests\Unit\Domain\Model\LogEntryTest\getLogDataForGarbageStringLogDataReturnsEmptyArray
‪getLogDataForGarbageStringLogDataReturnsEmptyArray()
Definition: LogEntryTest.php:56