Code Duplication    Length = 21-21 lines in 2 locations

tests/FwlibTest/Bridge/AdodbMysqlTest.php 2 locations

@@ 82-102 (lines=21) @@
79
    }
80
81
82
    public function testConvertEncodingResult()
83
    {
84
        // Backup original charset
85
        $originalCharsetPhp = self::$dbMysql->charsetPhp;
86
        $originalCharsetDb = self::$dbMysql->profile['lang'];
87
88
        self::$dbMysql->setCharsetPhp('UTF-8');
89
        self::$dbMysql->profile['lang'] = 'GB2312';
90
91
        $x = [null, '你好'];
92
        $y = [null, mb_convert_encoding('你好', 'UTF-8', 'GB2312')];
93
        $this->assertEquals(
94
            $y,
95
            self::$dbMysql->convertEncodingResult($x)
96
        );
97
98
99
        // Recover original charset
100
        self::$dbMysql->setCharsetPhp($originalCharsetPhp);
101
        self::$dbMysql->profile['lang'] = $originalCharsetDb;
102
    }
103
104
105
    public function testConvertEncodingSql()
@@ 105-125 (lines=21) @@
102
    }
103
104
105
    public function testConvertEncodingSql()
106
    {
107
        // Backup original charset
108
        $originalCharsetPhp = self::$dbMysql->charsetPhp;
109
        $originalCharsetDb = self::$dbMysql->profile['lang'];
110
111
        self::$dbMysql->setCharsetPhp('UTF-8');
112
        self::$dbMysql->profile['lang'] = 'GB2312';
113
114
        $x = [null, '你好'];
115
        $y = [null, mb_convert_encoding('你好', 'GB2312', 'UTF-8')];
116
        $this->assertEquals(
117
            $y,
118
            self::$dbMysql->convertEncodingSql($x)
119
        );
120
121
122
        // Recover original charset
123
        self::$dbMysql->setCharsetPhp($originalCharsetPhp);
124
        self::$dbMysql->profile['lang'] = $originalCharsetDb;
125
    }
126
127
128
    /**