Code Duplication    Length = 17-17 lines in 2 locations

tests/Doctrine/Tests/ORM/Query/SelectSqlGenerationTest.php 2 locations

@@ 901-917 (lines=17) @@
898
        $q->getSQL();
899
    }
900
901
    public function testBooleanLiteralInWhereOnSqlite()
902
    {
903
        $oldPlat = $this->_em->getConnection()->getDatabasePlatform();
904
        $this->_em->getConnection()->setDatabasePlatform(new SqlitePlatform());
905
906
        $this->assertSqlGeneration(
907
            "SELECT b FROM Doctrine\Tests\Models\Generic\BooleanModel b WHERE b.booleanField = true",
908
            "SELECT b0_.id AS id_0, b0_.booleanField AS booleanField_1 FROM boolean_model b0_ WHERE b0_.booleanField = 1"
909
        );
910
911
        $this->assertSqlGeneration(
912
            "SELECT b FROM Doctrine\Tests\Models\Generic\BooleanModel b WHERE b.booleanField = false",
913
            "SELECT b0_.id AS id_0, b0_.booleanField AS booleanField_1 FROM boolean_model b0_ WHERE b0_.booleanField = 0"
914
        );
915
916
        $this->_em->getConnection()->setDatabasePlatform($oldPlat);
917
    }
918
919
    public function testBooleanLiteralInWhereOnPostgres()
920
    {
@@ 919-935 (lines=17) @@
916
        $this->_em->getConnection()->setDatabasePlatform($oldPlat);
917
    }
918
919
    public function testBooleanLiteralInWhereOnPostgres()
920
    {
921
        $oldPlat = $this->_em->getConnection()->getDatabasePlatform();
922
        $this->_em->getConnection()->setDatabasePlatform(new PostgreSqlPlatform());
923
924
        $this->assertSqlGeneration(
925
            "SELECT b FROM Doctrine\Tests\Models\Generic\BooleanModel b WHERE b.booleanField = true",
926
            "SELECT b0_.id AS id_0, b0_.booleanField AS booleanfield_1 FROM boolean_model b0_ WHERE b0_.booleanField = true"
927
        );
928
929
        $this->assertSqlGeneration(
930
            "SELECT b FROM Doctrine\Tests\Models\Generic\BooleanModel b WHERE b.booleanField = false",
931
            "SELECT b0_.id AS id_0, b0_.booleanField AS booleanfield_1 FROM boolean_model b0_ WHERE b0_.booleanField = false"
932
        );
933
934
        $this->_em->getConnection()->setDatabasePlatform($oldPlat);
935
    }
936
937
    public function testSingleValuedAssociationFieldInWhere()
938
    {