|
@@ 14-24 (lines=11) @@
|
| 11 |
|
/** |
| 12 |
|
* @dataProvider getDataColumnCollation |
| 13 |
|
*/ |
| 14 |
|
public function testParseColumnCollation($collation, string $column, string $sql) : void |
| 15 |
|
{ |
| 16 |
|
$conn = $this->getMockBuilder(Connection::class)->disableOriginalConstructor()->getMock(); |
| 17 |
|
$conn->method('getDatabasePlatform')->willReturn(new SqlitePlatform()); |
| 18 |
|
|
| 19 |
|
$manager = new SqliteSchemaManager($conn); |
| 20 |
|
$ref = new \ReflectionMethod($manager, 'parseColumnCollationFromSQL'); |
| 21 |
|
$ref->setAccessible(true); |
| 22 |
|
|
| 23 |
|
self::assertEquals($collation, $ref->invoke($manager, $column, $sql)); |
| 24 |
|
} |
| 25 |
|
|
| 26 |
|
public function getDataColumnCollation() |
| 27 |
|
{ |
|
@@ 59-69 (lines=11) @@
|
| 56 |
|
/** |
| 57 |
|
* @dataProvider getDataColumnComment |
| 58 |
|
*/ |
| 59 |
|
public function testParseColumnCommentFromSQL($comment, string $column, string $sql) : void |
| 60 |
|
{ |
| 61 |
|
$conn = $this->getMockBuilder(Connection::class)->disableOriginalConstructor()->getMock(); |
| 62 |
|
$conn->method('getDatabasePlatform')->willReturn(new SqlitePlatform()); |
| 63 |
|
|
| 64 |
|
$manager = new SqliteSchemaManager($conn); |
| 65 |
|
$ref = new \ReflectionMethod($manager, 'parseColumnCommentFromSQL'); |
| 66 |
|
$ref->setAccessible(true); |
| 67 |
|
|
| 68 |
|
self::assertSame($comment, $ref->invoke($manager, $column, $sql)); |
| 69 |
|
} |
| 70 |
|
|
| 71 |
|
public function getDataColumnComment() |
| 72 |
|
{ |