Code Duplication    Length = 11-11 lines in 3 locations

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

@@ 1060-1070 (lines=11) @@
1057
     * @group locking
1058
     * @group DDC-178
1059
     */
1060
    public function testPessimisticReadLockQueryHintPostgreSql()
1061
    {
1062
        $this->_em->getConnection()->setDatabasePlatform(new PostgreSqlPlatform());
1063
1064
        $this->assertSqlGeneration(
1065
            "SELECT u FROM Doctrine\Tests\Models\CMS\CmsUser u WHERE u.username = 'gblanco'",
1066
            "SELECT c0_.id AS id_0, c0_.status AS status_1, c0_.username AS username_2, c0_.name AS name_3 ".
1067
            "FROM cms_users c0_ WHERE c0_.username = 'gblanco' FOR SHARE",
1068
            [ORMQuery::HINT_LOCK_MODE => LockMode::PESSIMISTIC_READ]
1069
        );
1070
    }
1071
1072
    /**
1073
     * @group DDC-1693
@@ 1101-1111 (lines=11) @@
1098
     * @group locking
1099
     * @group DDC-178
1100
     */
1101
    public function testPessimisticReadLockQueryHintMySql()
1102
    {
1103
        $this->_em->getConnection()->setDatabasePlatform(new MySqlPlatform());
1104
1105
        $this->assertSqlGeneration(
1106
            "SELECT u FROM Doctrine\Tests\Models\CMS\CmsUser u WHERE u.username = 'gblanco'",
1107
            "SELECT c0_.id AS id_0, c0_.status AS status_1, c0_.username AS username_2, c0_.name AS name_3 ".
1108
            "FROM cms_users c0_ WHERE c0_.username = 'gblanco' LOCK IN SHARE MODE",
1109
            [ORMQuery::HINT_LOCK_MODE => LockMode::PESSIMISTIC_READ]
1110
        );
1111
    }
1112
1113
    /**
1114
     * @group locking
@@ 1117-1127 (lines=11) @@
1114
     * @group locking
1115
     * @group DDC-178
1116
     */
1117
    public function testPessimisticReadLockQueryHintOracle()
1118
    {
1119
        $this->_em->getConnection()->setDatabasePlatform(new OraclePlatform());
1120
1121
        $this->assertSqlGeneration(
1122
            "SELECT u FROM Doctrine\Tests\Models\CMS\CmsUser u WHERE u.username = 'gblanco'",
1123
            "SELECT c0_.id AS ID_0, c0_.status AS STATUS_1, c0_.username AS USERNAME_2, c0_.name AS NAME_3 ".
1124
            "FROM cms_users c0_ WHERE c0_.username = 'gblanco' FOR UPDATE",
1125
            [ORMQuery::HINT_LOCK_MODE => LockMode::PESSIMISTIC_READ]
1126
        );
1127
    }
1128
1129
    /**
1130
     * @group DDC-431