‪TYPO3CMS  ‪main
MockMySQLPlatform.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 
20 use ‪TYPO3\CMS\Core\Database\Platform\MySQL80Platform as Typo3MySQL80Platform;
22 
23 class ‪MockMySQLPlatform extends Typo3MySQL80Platform
24 {
30  public function ‪getBlobTypeDeclarationSQL(array $field): string
31  {
32  return '';
33  }
34 
38  public function ‪getBooleanTypeDeclarationSQL(array $columnDef): string
39  {
40  return '';
41  }
42 
46  public function ‪getIntegerTypeDeclarationSQL(array $columnDef): string
47  {
48  return '';
49  }
50 
54  public function ‪getBigIntTypeDeclarationSQL(array $columnDef): string
55  {
56  return '';
57  }
58 
62  public function ‪getSmallIntTypeDeclarationSQL(array $columnDef): string
63  {
64  return '';
65  }
66 
70  public function ‪_getCommonIntegerTypeDeclarationSQL(array $columnDef): string
71  {
72  return '';
73  }
74 
78  public function ‪getVarcharTypeDeclarationSQL(array $field): string
79  {
80  return 'DUMMYVARCHAR()';
81  }
82 
86  public function ‪getClobTypeDeclarationSQL(array $field): string
87  {
88  return 'DUMMYCLOB';
89  }
90 
99  public function ‪getJsonTypeDeclarationSQL(array $field): string
100  {
101  return 'DUMMYJSON';
102  }
103 
109  public function ‪getBinaryTypeDeclarationSQL(array $field): string
110  {
111  return 'DUMMYBINARY';
112  }
113 
117  protected function ‪initializeDoctrineTypeMappings(): void {}
118 
126  protected function ‪getVarcharTypeDeclarationSQLSnippet($length): string
127  {
128  return '';
129  }
130 
137  protected function ‪getReservedKeywordsClass(): string
138  {
139  return MockKeywordList::class;
140  }
141 
142  public function ‪getCurrentDatabaseExpression(): string
143  {
144  return "''";
145  }
146 }
‪TYPO3\CMS\Core\Tests\Unit\Database\Mocks\MockPlatform\MockMySQLPlatform\getVarcharTypeDeclarationSQLSnippet
‪string getVarcharTypeDeclarationSQLSnippet($length)
Definition: MockMySQLPlatform.php:126
‪TYPO3\CMS\Core\Tests\Unit\Database\Mocks\MockPlatform\MockMySQLPlatform\getIntegerTypeDeclarationSQL
‪getIntegerTypeDeclarationSQL(array $columnDef)
Definition: MockMySQLPlatform.php:46
‪TYPO3\CMS\Core\Tests\Unit\Database\Mocks\MockPlatform\MockMySQLPlatform\getVarcharTypeDeclarationSQL
‪getVarcharTypeDeclarationSQL(array $field)
Definition: MockMySQLPlatform.php:78
‪TYPO3\CMS\Core\Tests\Unit\Database\Mocks\MockKeywordList
Definition: MockKeywordList.php:23
‪TYPO3\CMS\Core\Tests\Unit\Database\Mocks\MockPlatform\MockMySQLPlatform\getCurrentDatabaseExpression
‪getCurrentDatabaseExpression()
Definition: MockMySQLPlatform.php:142
‪TYPO3\CMS\Core\Tests\Unit\Database\Mocks\MockPlatform\MockMySQLPlatform\getSmallIntTypeDeclarationSQL
‪getSmallIntTypeDeclarationSQL(array $columnDef)
Definition: MockMySQLPlatform.php:62
‪TYPO3\CMS\Core\Tests\Unit\Database\Mocks\MockPlatform\MockMySQLPlatform\getJsonTypeDeclarationSQL
‪getJsonTypeDeclarationSQL(array $field)
Definition: MockMySQLPlatform.php:99
‪TYPO3\CMS\Core\Database\Platform\MySQL80Platform
Definition: MySQL80Platform.php:33
‪TYPO3\CMS\Core\Tests\Unit\Database\Mocks\MockPlatform\MockMySQLPlatform\getClobTypeDeclarationSQL
‪getClobTypeDeclarationSQL(array $field)
Definition: MockMySQLPlatform.php:86
‪TYPO3\CMS\Core\Tests\Unit\Database\Mocks\MockPlatform\MockMySQLPlatform\getBinaryTypeDeclarationSQL
‪getBinaryTypeDeclarationSQL(array $field)
Definition: MockMySQLPlatform.php:109
‪TYPO3\CMS\Core\Tests\Unit\Database\Mocks\MockPlatform\MockMySQLPlatform\_getCommonIntegerTypeDeclarationSQL
‪_getCommonIntegerTypeDeclarationSQL(array $columnDef)
Definition: MockMySQLPlatform.php:70
‪TYPO3\CMS\Core\Tests\Unit\Database\Mocks\MockPlatform\MockMySQLPlatform\getBooleanTypeDeclarationSQL
‪getBooleanTypeDeclarationSQL(array $columnDef)
Definition: MockMySQLPlatform.php:38
‪TYPO3\CMS\Core\Tests\Unit\Database\Mocks\MockPlatform
Definition: MockMariaDBPlatform.php:18
‪TYPO3\CMS\Core\Tests\Unit\Database\Mocks\MockPlatform\MockMySQLPlatform
Definition: MockMySQLPlatform.php:24
‪TYPO3\CMS\Core\Tests\Unit\Database\Mocks\MockPlatform\MockMySQLPlatform\getBlobTypeDeclarationSQL
‪getBlobTypeDeclarationSQL(array $field)
Definition: MockMySQLPlatform.php:30
‪TYPO3\CMS\Core\Tests\Unit\Database\Mocks\MockPlatform\MockMySQLPlatform\initializeDoctrineTypeMappings
‪initializeDoctrineTypeMappings()
Definition: MockMySQLPlatform.php:117
‪TYPO3\CMS\Core\Tests\Unit\Database\Mocks\MockPlatform\MockMySQLPlatform\getBigIntTypeDeclarationSQL
‪getBigIntTypeDeclarationSQL(array $columnDef)
Definition: MockMySQLPlatform.php:54
‪TYPO3\CMS\Core\Tests\Unit\Database\Mocks\MockPlatform\MockMySQLPlatform\getReservedKeywordsClass
‪getReservedKeywordsClass()
Definition: MockMySQLPlatform.php:137