$columns =
$schemaManager->
listTableColumns($tableName);
static::
assertCount($expectation['indexes'
],
$indexes,
print_r($indexes, true
) . ' index on ' .
$tableName);
static::
assertCount($expectation['foreignKeys'
],
$foreignKeys,
print_r($foreignKeys, true
) . ' foreignKey on ' .
$tableName);
static::
assertCount($expectation['columns'
],
$columns,
print_r($columns, true
) . ' columns on ' .
$tableName);
} foreach ($playbook as $query) { $connection->
executeStatement($query);
} foreach ($this->
getExpectationsAfter() as $tableName =>
$expectation) { $indexes =
$schemaManager->
listTableIndexes($tableName);
$foreignKeys =
$schemaManager->
listTableForeignKeys($tableName);
$columns =
$schemaManager->
listTableColumns($tableName);
static::
assertCount($expectation['indexes'
],
$indexes,
print_r($indexes, true
) . ' index on ' .
$tableName);
static::
assertCount($expectation['foreignKeys'
],
$foreignKeys,
print_r($foreignKeys, true
) . ' foreignKey on ' .
$tableName);
static::
assertCount($expectation['columns'
],
$columns,
print_r($columns, true
) . ' columns on ' .
$tableName);
switch ($tableName) { case '_dpkc_main_translation':
static::
assertSame(['_dpkc_main_id', 'language_id', '_dpkc_main_mission_id'
],
$indexes['primary'
]->
getColumns());