TYPO3 CMS  TYPO3_7-6
LogEntryTest.php
Go to the documentation of this file.
1 <?php
3 
4 /*
5  * This file is part of the TYPO3 CMS project.
6  *
7  * It is free software; you can redistribute it and/or modify it under
8  * the terms of the GNU General Public License, either version 2
9  * of the License, or any later version.
10  *
11  * For the full copyright and license information, please read the
12  * LICENSE.txt file that was distributed with this source code.
13  *
14  * The TYPO3 project - inspiring people to share!
15  */
16 
22 {
26  protected $subject = null;
27 
28  protected function setUp()
29  {
30  $this->subject = new \TYPO3\CMS\Belog\Domain\Model\LogEntry();
31  }
32 
37  {
38  $this->assertSame([], $this->subject->getLogData());
39  }
40 
45  {
46  $this->subject->setLogData('');
47  $this->assertSame([], $this->subject->getLogData());
48  }
49 
54  {
55  $this->subject->setLogData('foo bar');
56  $this->assertSame([], $this->subject->getLogData());
57  }
58 
63  {
64  $logData = ['foo', 'bar'];
65  $this->subject->setLogData(serialize($logData));
66  $this->assertSame($logData, $this->subject->getLogData());
67  }
68 
73  {
74  $this->subject->setLogData(new \stdClass());
75  $this->assertSame([], $this->subject->getLogData());
76  }
77 }
getLogDataForEmptyStringLogDataReturnsEmptyArray()
getLogDataForSerializedArrayReturnsThatArray()
$subject
setUp()
getLogDataInitiallyReturnsEmptyArray()
getLogDataForSerializedObjectReturnsEmptyArray()
getLogDataForGarbageStringLogDataReturnsEmptyArray()