$schema =
$this->
getMockBuilder('Drupal\Core\Database\Schema'
) ->
disableOriginalConstructor() ->
getMock();
$schema->
expects($this->
exactly(2
)) ->
method('tableExists'
) ->
willReturnMap([ ['migrate_map_sql_idmap_test', FALSE
],
['migrate_message_sql_idmap_test', FALSE
],
]);
$schema->
expects($this->
exactly(2
)) ->
method('createTable'
) ->
withConsecutive( ['migrate_map_sql_idmap_test',
$map_table_schema],
['migrate_message_sql_idmap_test',
$table_schema],
);
$this->
runEnsureTablesTest($schema);
} /**
* Tests the ensureTables method when the tables exist.
*/
public function testEnsureTablesExist() {