@@ -159,7 +159,7 @@ public function testAddDropPrimaryKey()
159159 public function testBuildUnion ()
160160 {
161161 $ expectedQuerySql = $ this ->replaceQuotes (
162- " SELECT [[id]] FROM [[TotalExample]] [[t1]] WHERE (w > 0) AND (x < 2) UNION SELECT [[id]] FROM [[TotalTotalExample]] [[t2]] WHERE w > 5 UNION ALL SELECT [[id]] FROM [[TotalTotalExample]] [[t3]] WHERE w = 3 "
162+ ' SELECT [[id]] FROM [[TotalExample]] [[t1]] WHERE (w > 0) AND (x < 2) UNION SELECT [[id]] FROM [[TotalTotalExample]] [[t2]] WHERE w > 5 UNION ALL SELECT [[id]] FROM [[TotalTotalExample]] [[t3]] WHERE w = 3 '
163163 );
164164 $ query = new Query ();
165165 $ secondQuery = new Query ();
@@ -174,7 +174,7 @@ public function testBuildUnion()
174174 ->from ('TotalExample t1 ' )
175175 ->where (['and ' , 'w > 0 ' , 'x < 2 ' ])
176176 ->union ($ secondQuery )
177- ->union ($ thirdQuery , TRUE );
177+ ->union ($ thirdQuery , true );
178178 list ($ actualQuerySql , $ queryParams ) = $ this ->getQueryBuilder ()->build ($ query );
179179 $ this ->assertEquals ($ expectedQuerySql , $ actualQuerySql );
180180 $ this ->assertEquals ([], $ queryParams );
@@ -245,13 +245,13 @@ public function testRenameColumn()
245245 $ columns = $ connection ->getTableSchema ('type ' , true )->columnNames ;
246246
247247 foreach ($ columns as $ column ) {
248- $ connection ->createCommand ($ qb ->renameColumn ('type ' , $ column , $ column. '_new ' ))->execute ();
248+ $ connection ->createCommand ($ qb ->renameColumn ('type ' , $ column , $ column . '_new ' ))->execute ();
249249 }
250250
251251 $ schema = $ connection ->getTableSchema ('type ' , true );
252252 foreach ($ columns as $ column ) {
253253 $ this ->assertNotContains ($ column , $ schema ->columnNames );
254- $ this ->assertContains ($ column. '_new ' , $ schema ->columnNames );
254+ $ this ->assertContains ($ column . '_new ' , $ schema ->columnNames );
255255 }
256256 }
257257
@@ -262,7 +262,7 @@ public function testAlterColumn()
262262
263263 $ connection ->createCommand ($ qb ->alterColumn ('customer ' , 'email ' , Schema::TYPE_STRING . '(128) NULL ' ))->execute ();
264264 $ connection ->createCommand ($ qb ->alterColumn ('customer ' , 'name ' , "SET DEFAULT 'NO NAME' " ))->execute ();
265- $ connection ->createCommand ($ qb ->alterColumn ('customer ' , 'name ' , Schema::TYPE_STRING . " (128) NOT NULL " ))->execute ();
265+ $ connection ->createCommand ($ qb ->alterColumn ('customer ' , 'name ' , Schema::TYPE_STRING . ' (128) NOT NULL ' ))->execute ();
266266 $ connection ->createCommand ($ qb ->alterColumn ('customer ' , 'profile_id ' , Schema::TYPE_INTEGER . ' NOT NULL ' ))->execute ();
267267
268268 $ newColumns = $ connection ->getTableSchema ('customer ' , true )->columns ;
@@ -367,7 +367,7 @@ public function testCommentColumn()
367367 $ sql = $ qb ->addCommentOnColumn ('comment ' , 'replace_comment ' , 'This is my column. ' );
368368 $ this ->assertEquals ($ expected , $ sql );
369369
370- $ expected = $ this ->replaceQuotes (" COMMENT ON COLUMN [[comment]].[[delete_comment]] IS NULL " );
370+ $ expected = $ this ->replaceQuotes (' COMMENT ON COLUMN [[comment]].[[delete_comment]] IS NULL ' );
371371 $ sql = $ qb ->dropCommentFromColumn ('comment ' , 'delete_comment ' );
372372 $ this ->assertEquals ($ expected , $ sql );
373373 }
@@ -380,25 +380,25 @@ public function testCommentTable()
380380 $ sql = $ qb ->addCommentOnTable ('comment ' , 'This is my table. ' );
381381 $ this ->assertEquals ($ expected , $ sql );
382382
383- $ expected = $ this ->replaceQuotes (" COMMENT ON TABLE [[comment]] IS NULL " );
383+ $ expected = $ this ->replaceQuotes (' COMMENT ON TABLE [[comment]] IS NULL ' );
384384 $ sql = $ qb ->dropCommentFromTable ('comment ' );
385385 $ this ->assertEquals ($ expected , $ sql );
386386 }
387387
388388 public function testReplaceQuotes ()
389389 {
390390 //Normal words
391- $ this ->assertEquals ('comment ' , $ this ->replaceQuotes (" [[comment]] " ));
392- $ this ->assertEquals ('test ' , $ this ->replaceQuotes (" [[test]] " ));
391+ $ this ->assertEquals ('comment ' , $ this ->replaceQuotes (' [[comment]] ' ));
392+ $ this ->assertEquals ('test ' , $ this ->replaceQuotes (' [[test]] ' ));
393393
394394 //Reserved Words lower case
395- $ this ->assertEquals ('"order" ' , $ this ->replaceQuotes (" [[order]] " ));
396- $ this ->assertEquals ('"time" ' , $ this ->replaceQuotes (" [[time]] " ));
395+ $ this ->assertEquals ('"order" ' , $ this ->replaceQuotes (' [[order]] ' ));
396+ $ this ->assertEquals ('"time" ' , $ this ->replaceQuotes (' [[time]] ' ));
397397 //Reserved Words UPPER CASE
398- $ this ->assertEquals ('"ORDER" ' , $ this ->replaceQuotes (" [[ORDER]] " ));
399- $ this ->assertEquals ('"TIME" ' , $ this ->replaceQuotes (" [[TIME]] " ));
398+ $ this ->assertEquals ('"ORDER" ' , $ this ->replaceQuotes (' [[ORDER]] ' ));
399+ $ this ->assertEquals ('"TIME" ' , $ this ->replaceQuotes (' [[TIME]] ' ));
400400 //Reserved Words Multiple
401- $ this ->assertEquals ('"order".comment ' , $ this ->replaceQuotes (" [[order]].[[comment]] " ));
402- $ this ->assertEquals ('"order"."time" ' , $ this ->replaceQuotes (" [[order]].[[time]] " ));
401+ $ this ->assertEquals ('"order".comment ' , $ this ->replaceQuotes (' [[order]].[[comment]] ' ));
402+ $ this ->assertEquals ('"order"."time" ' , $ this ->replaceQuotes (' [[order]].[[time]] ' ));
403403 }
404404}
0 commit comments