Code Duplication    Length = 17-18 lines in 3 locations

tests/Query/FirebirdQueryTest.php 1 location

@@ 19-36 (lines=18) @@
16
/**
17
 * Class FirebirdQueryTest
18
 */
19
class FirebirdQueryTest extends QueryTestAbstract{
20
21
	protected $driver = PDOFirebirdDriver::class;
22
	protected $envVar = 'DB_FIREBIRD_';
23
24
	public function testCreateDatabase(){
25
		$this->assertSame(
26
			'CREATE DATABASE querytest DEFAULT CHARACTER SET UTF8',
27
			$this->createDatabase()->sql()
28
		);
29
30
		$this->assertSame(
31
			'CREATE DATABASE querytest DEFAULT CHARACTER SET UTF8 COLLATION UNICODE_CI_AI',
32
			$this->createDatabase()->charset('utf8_UNICODE_CI_AI')->sql()
33
		);
34
	}
35
36
}
37

tests/Query/MySQLQueryTest.php 1 location

@@ 19-35 (lines=17) @@
16
/**
17
 * Class MySQLQueryTest
18
 */
19
class MySQLQueryTest extends QueryTestAbstract{
20
21
	protected $driver = MySQLiDriver::class;
22
	protected $envVar = 'DB_MYSQLI_';
23
24
	public function testCreateDatabase(){
25
		$this->assertSame(
26
			'CREATE DATABASE querytest CHARACTER SET utf8',
27
			$this->createDatabase()->sql()
28
		);
29
30
		$this->assertSame(
31
			'CREATE DATABASE IF NOT EXISTS querytest CHARACTER SET utf8mb4 COLLATE utf8mb4_bin',
32
			$this->createDatabase()->charset('utf8mb4_bin')->ifNotExists()->sql()
33
		);
34
	}
35
}
36

tests/Query/PostgresQueryTest.php 1 location

@@ 19-36 (lines=18) @@
16
/**
17
 * Class PostgresQueryTest
18
 */
19
class PostgresQueryTest extends QueryTestAbstract{
20
21
	protected $driver = PostgreSQLDriver::class;
22
	protected $envVar = 'DB_POSTGRES_';
23
24
	public function testCreateDatabase(){
25
		$this->assertSame(
26
			'CREATE DATABASE querytest ENCODING \'UTF8\'',
27
			$this->createDatabase()->sql()
28
		);
29
30
		$this->assertSame(
31
			'CREATE DATABASE querytest ENCODING \'EUC_KR\' LC_COLLATE=\'ko_KR.euckr\' LC_CTYPE=\'ko_KR.euckr\'',
32
			$this->createDatabase()->charset('EUC_KR,ko_KR.euckr,ko_KR.euckr')->sql()
33
		);
34
	}
35
36
}
37