@@ 19-48 (lines=30) @@ | ||
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 setUp(){ |
|
25 | # $this->markTestIncomplete('use the vagrant box...'); |
|
26 | # } |
|
27 | ||
28 | public function testCreateDatabase(){ |
|
29 | $this->assertSame( |
|
30 | 'CREATE DATABASE "dbtest" DEFAULT CHARACTER SET UTF8', |
|
31 | $this->createDatabase()->sql() |
|
32 | ); |
|
33 | ||
34 | $this->assertSame( |
|
35 | 'CREATE DATABASE "dbtest" DEFAULT CHARACTER SET UTF8 COLLATION UNICODE_CI_AI', |
|
36 | $this->createDatabase()->charset('utf8_UNICODE_CI_AI')->sql() |
|
37 | ); |
|
38 | } |
|
39 | ||
40 | public function testCreateTable(){ |
|
41 | $this->DBDriver->raw('DROP TABLE "'.self::TEST_TABLENAME.'"'); |
|
42 | ||
43 | var_dump($this->createTable()->sql()); |
|
44 | var_dump($this->createTable()->execute()); |
|
45 | $this->markTestIncomplete(); |
|
46 | } |
|
47 | ||
48 | } |
|
49 |
@@ 19-42 (lines=24) @@ | ||
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 `dbtest` CHARACTER SET utf8', |
|
27 | $this->createDatabase()->sql() |
|
28 | ); |
|
29 | ||
30 | $this->assertSame( |
|
31 | 'CREATE DATABASE IF NOT EXISTS `dbtest` CHARACTER SET utf8mb4 COLLATE utf8mb4_bin', |
|
32 | $this->createDatabase()->charset('utf8mb4_bin')->ifNotExists()->sql() |
|
33 | ); |
|
34 | } |
|
35 | ||
36 | public function testCreateTable(){ |
|
37 | $this->DBDriver->raw('DROP TABLE '.self::TEST_TABLENAME.''); |
|
38 | var_dump($this->createTable()->sql()); |
|
39 | var_dump($this->createTable()->execute()); |
|
40 | $this->markTestIncomplete(); |
|
41 | } |
|
42 | } |
|
43 |
@@ 19-44 (lines=26) @@ | ||
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 "dbtest" ENCODING \'UTF8\'', |
|
27 | $this->createDatabase()->sql() |
|
28 | ); |
|
29 | ||
30 | $this->assertSame( |
|
31 | 'CREATE DATABASE "dbtest" 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 | public function testCreateTable(){ |
|
37 | $this->DBDriver->raw('DROP TABLE '.self::TEST_TABLENAME.''); |
|
38 | ||
39 | var_dump($this->createTable()->sql()); |
|
40 | var_dump($this->createTable()->execute()); |
|
41 | $this->markTestIncomplete(); |
|
42 | } |
|
43 | ||
44 | } |
|
45 |