[BUGFIX] Fix functional tests for EXT:backend on PostgreSQL 65/51665/3
authorMorton Jonuschat <m.jonuschat@mojocode.de>
Wed, 8 Feb 2017 04:22:37 +0000 (20:22 -0800)
committerChristian Kuhn <lolli@schwarzbu.ch>
Thu, 16 Feb 2017 20:14:16 +0000 (21:14 +0100)
Sort expected results retrieved from the database and switch to using
assertEquals() to avoid string/int type differences in result rows
due to different drivers.

Change-Id: I65975967171c28a13c8711d352895d2969d408ea
Resolves: #79671
Releases: master
Reviewed-on: https://review.typo3.org/51665
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch>
Tested-by: Christian Kuhn <lolli@schwarzbu.ch>
typo3/sysext/backend/Tests/Functional/Controller/Page/LocalizationControllerTest.php

index a6baf03..5f59799 100644 (file)
@@ -99,9 +99,10 @@ class LocalizationControllerTest extends \TYPO3\TestingFramework\Core\Functional
                     )
                 )
             )
+            ->orderBy('uid')
             ->execute()
             ->fetchAll();
-        $this->assertSame($expectedResults, $results);
+        $this->assertEquals($expectedResults, $results);
     }
 
     /**
@@ -157,9 +158,10 @@ class LocalizationControllerTest extends \TYPO3\TestingFramework\Core\Functional
                     )
                 )
             )
+            ->orderBy('uid')
             ->execute()
             ->fetchAll();
-        $this->assertSame($expectedResults, $results);
+        $this->assertEquals($expectedResults, $results);
     }
 
     /**
@@ -213,9 +215,10 @@ class LocalizationControllerTest extends \TYPO3\TestingFramework\Core\Functional
                     )
                 )
             )
+            ->orderBy('uid')
             ->execute()
             ->fetchAll();
-        $this->assertSame($expectedResults, $results);
+        $this->assertEquals($expectedResults, $results);
     }
 
     /**
@@ -271,9 +274,10 @@ class LocalizationControllerTest extends \TYPO3\TestingFramework\Core\Functional
                     )
                 )
             )
+            ->orderBy('uid')
             ->execute()
             ->fetchAll();
-        $this->assertSame($expectedResults, $results);
+        $this->assertEquals($expectedResults, $results);
     }
 
     /**
@@ -358,9 +362,10 @@ class LocalizationControllerTest extends \TYPO3\TestingFramework\Core\Functional
                         $queryBuilder->createNamedParameter(1, \PDO::PARAM_INT)
                     )
                 )
-            )->orderBy('sorting', 'ASC')
+            )
+            ->orderBy('sorting', 'ASC')
             ->execute()
             ->fetchAll();
-        $this->assertSame($expectedResults, $results);
+        $this->assertEquals($expectedResults, $results);
     }
 }