‪TYPO3CMS  10.4
DatabaseWriterTest.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 
18 use PHPUnit\Framework\MockObject\MockObject;
21 use TYPO3\TestingFramework\Core\Unit\UnitTestCase;
22 
26 class ‪DatabaseWriterTest extends UnitTestCase
27 {
32  {
33  $logTable = ‪StringUtility::getUniqueId('logtable_');
35  $subject = $this->getMockBuilder(DatabaseWriter::class)
36  ->setMethods(['dummy'])
37  ->disableOriginalConstructor()
38  ->getMock();
39  $subject->setLogTable($logTable);
40  self::assertSame($logTable, $subject->getLogTable());
41  }
42 }
‪TYPO3\CMS\Core\Log\Writer\DatabaseWriter
Definition: DatabaseWriter.php:27
‪TYPO3\CMS\Core\Tests\Unit\Log\Writer\DatabaseWriterTest
Definition: DatabaseWriterTest.php:27
‪TYPO3\CMS\Core\Tests\Unit\Log\Writer\DatabaseWriterTest\getTableReturnsPreviouslySetTable
‪getTableReturnsPreviouslySetTable()
Definition: DatabaseWriterTest.php:31
‪TYPO3\CMS\Core\Tests\Unit\Log\Writer
Definition: AbstractWriterTest.php:16
‪TYPO3\CMS\Core\Utility\StringUtility\getUniqueId
‪static string getUniqueId($prefix='')
Definition: StringUtility.php:92
‪TYPO3\CMS\Core\Utility\StringUtility
Definition: StringUtility.php:22