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