Completed
Push — master ( ec27e4...948d8b )
by smiley
14:17
created

MySQLQueryTest::testCreateTable()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 3

Duplication

Lines 4
Ratio 100 %

Importance

Changes 0
Metric Value
c 0
b 0
f 0
dl 4
loc 4
rs 10
cc 1
eloc 3
nc 1
nop 0
1
<?php
2
/**
3
 *
4
 * @filesource   MySQLQueryTest.php
5
 * @created      12.06.2017
6
 * @package      chillerlan\DatabaseTest\Query
7
 * @author       Smiley <[email protected]>
8
 * @copyright    2017 Smiley
9
 * @license      MIT
10
 */
11
12
namespace chillerlan\DatabaseTest\Query;
13
14
use chillerlan\Database\Drivers\MySQLiDriver;
15
16
/**
17
 * Class MySQLQueryTest
18
 */
19 View Code Duplication
class MySQLQueryTest extends QueryTestAbstract{
0 ignored issues
show
Duplication introduced by
This class seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
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
	public function testCreateTable(){
37
		var_dump($this->createTable()->sql());
0 ignored issues
show
Security Debugging Code introduced by
var_dump($this->createTable()->sql()); looks like debug code. Are you sure you do not want to remove it? This might expose sensitive data.
Loading history...
38
		$this->markTestIncomplete();
39
	}
40
}
41