public function SmartSqlTest::testGetQualifiedMapTablePrefix in Smart SQL ID Map 1.0.x
Same name and namespace in other branches
- 1.1.x tests/src/Unit/Plugin/migrate/id_map/SmartSqlTest.php \Drupal\Tests\smart_sql_idmap\Unit\Plugin\migrate\id_map\SmartSqlTest::testGetQualifiedMapTablePrefix()
Tests the getQualifiedMapTable method with a prefixed database.
Overrides MigrateSqlIdMapTest::testGetQualifiedMapTablePrefix
File
- tests/
src/ Unit/ Plugin/ migrate/ id_map/ SmartSqlTest.php, line 432
Class
- SmartSqlTest
- Tests the Smart SQL ID map plugin.
Namespace
Drupal\Tests\smart_sql_idmap\Unit\Plugin\migrate\id_mapCode
public function testGetQualifiedMapTablePrefix() {
$connection_options = [
'database' => ':memory:',
'prefix' => 'prefix',
];
$pdo = Connection::open($connection_options);
$this->database = new Connection($pdo, $connection_options);
$qualified_map_table = $this
->getIdMap()
->getQualifiedMapTableName();
// The SQLite driver is a special flower. It will prefix tables with
// PREFIX.TABLE, instead of the standard PREFIXTABLE.
// @see \Drupal\Core\Database\Driver\sqlite\Connection::__construct()
$this
->assertEquals("prefix.{$this->expectedPrefixedMapTableName}", $qualified_map_table);
}