/** * Sets defaults for SQL ID map plugin tests. * * @return array * An associative array with the following keys: * - source_row_status * - rollback_action * - hash */ protected function idMapDefaults() { $defaults = array('source_row_status' => MigrateIdMapInterface::STATUS_IMPORTED, 'rollback_action' => MigrateIdMapInterface::ROLLBACK_DELETE, 'hash' => ''); // By default, the PDO SQLite driver strongly prefers to return strings // from SELECT queries. Even for columns that don't store strings. Even // if the connection's STRINGIFY_FETCHES attribute is FALSE. This can cause // assertSame() calls to fail, since 0 !== '0'. Casting these values to // strings isn't the most elegant workaround, but it allows the assertions // to pass properly. if ($this->database->driver() == 'sqlite') { $defaults['source_row_status'] = (string) $defaults['source_row_status']; $defaults['rollback_action'] = (string) $defaults['rollback_action']; } return $defaults; }