@@ -40,6 +40,7 @@ public function testSimulatedSqlSync()
4040        ];
4141        $ this setUpSettings ($ fixtureSites'synctest ' );
4242        $ options
43+             'uri '  => 'OMIT ' ,
4344            'simulate '  => null ,
4445            'alias-path '  => __DIR__  . '/resources/alias-fixtures ' ,
4546        ];
@@ -88,34 +89,39 @@ public function localSqlSync()
8889    {
8990
9091        $ options
91-             'uri '  => 'stage ' ,
9292            'yes '  => null ,
93+             'uri '  => 'OMIT ' ,
9394        ];
9495
96+         $ stage_options
97+             'uri '  => 'stage ' ,
98+         ] + $ options
99+ 
95100        // Create a user in the staging site 
96101        $ name'joe.user ' ;
9710298103
99104        // Add user fields and a test User. 
100-         $ this drush ('pm-enable ' , ['field,text,telephone,comment ' ], $ options 'yes '  => null ]);
101-         $ this drush ('php-script ' , ['user_fields-D8 ' , $ name$ mail$ options 'script-path '  => __DIR__  . '/resources ' ,]);
105+         $ this drush ('pm-enable ' , ['field,text,telephone,comment ' ], $ stage_options 'yes '  => null ]);
106+         $ this drush ('php-script ' , ['user_fields-D8 ' , $ name$ mail$ stage_options 'script-path '  => __DIR__  . '/resources ' ,]);
102107
103108        // Copy stage to dev, and then sql:sanitize. 
104109        $ sync_options
105110            'yes '  => null ,
111+             'uri '  => 'OMIT ' ,
106112            // Test wildcards expansion from within sql-sync. Also avoid D8 persistent entity cache. 
107113            'structure-tables-list '  => 'cache,cache* ' ,
108114        ];
109115        $ this drush ('sql-sync ' , ['@sut.stage ' , '@sut.dev ' ], $ sync_options
110-         $ this drush ('sql-sanitize ' , [], ['yes '  => null ], '@sut.dev ' );
116+         $ this drush ('sql-sanitize ' , [], ['yes '  => null ,  ' uri '  =>  ' dev ' , ], '@sut.dev ' );
111117
112118        // Confirm that the sample user is unchanged on the staging site 
113119        $ this drush ('user-information ' , [$ name$ options'format '  => 'json ' ], '@sut.stage ' );
114120        $ info$ this getOutputFromJSON (2 );
115121        $ this assertEquals ($ mail$ infomail , 'Email address is unchanged on source site. ' );
116122        $ this assertEquals ($ name$ infoname );
117123        // Get the unchanged pass. 
118-         $ this drush ('user-information ' , [$ name$ options 'field '  => 'pass ' ]);
124+         $ this drush ('user-information ' , [$ name$ stage_options 'field '  => 'pass ' ]);
119125        $ original_hashed_pass$ this getOutput ();
120126
121127        // Confirm that the sample user's email and password have been sanitized on the dev site 
@@ -128,11 +134,12 @@ public function localSqlSync()
128134        // Copy stage to dev with --sanitize and a fixed sanitized email 
129135        $ sync_options
130136            'yes '  => null ,
137+             'uri '  => 'OMIT ' ,
131138            // Test wildcards expansion from within sql-sync. Also avoid D8 persistent entity cache. 
132139            'structure-tables-list '  => 'cache,cache* ' ,
133140        ];
134141        $ this drush ('sql-sync ' , ['@sut.stage ' , '@sut.dev ' ], $ sync_options
135-         $ this ->
drush (
'sql-sanitize ' , [], [
'yes '  => 
null , 
'sanitize-email '  => 
'[email protected]  ], 
'@sut.dev ' );
 142+         $ this ->
drush (
'sql-sanitize ' , [], [
'yes '  => 
null , 
'sanitize-email '  => 
'[email protected]  ,  ' uri '  =>  ' OMIT ' , ], 
'@sut.dev ' );
 136143
137144        // Confirm that the sample user's email address has been sanitized on the dev site 
138145        $ this drush ('user-information ' , [$ name$ options'yes '  => null , 'format '  => 'json ' ], '@sut.dev ' );
@@ -172,7 +179,7 @@ public function assertUserFieldContents($field_name, $value, $should_contain = f
172179    {
173180        $ table'user__ '  . $ field_name
174181        $ column$ field_name'_value ' ;
175-         $ this drush ('sql-query ' , ["SELECT  $ column FROM  $ table LIMIT 1 " ], [], '@sut.dev ' );
182+         $ this drush ('sql-query ' , ["SELECT  $ column FROM  $ table LIMIT 1 " ], [' uri '  =>  ' OMIT ' , ], '@sut.dev ' );
176183        $ output$ this getOutput ();
177184        $ this assertNotEmpty ($ output
178185
0 commit comments