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

FirebirdQueryTest::testCreateTable()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 4

Duplication

Lines 6
Ratio 100 %

Importance

Changes 0
Metric Value
c 0
b 0
f 0
dl 6
loc 6
rs 9.4285
cc 1
eloc 4
nc 1
nop 0
1
<?php
2
/**
3
 *
4
 * @filesource   FirebirdQueryTest.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\PDO\PDOFirebirdDriver;
15
16
/**
17
 * Class FirebirdQueryTest
18
 */
19 View Code Duplication
class FirebirdQueryTest 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 = PDOFirebirdDriver::class;
22
	protected $envVar = 'DB_FIREBIRD_';
23
24
#	public function setUp(){
0 ignored issues
show
Unused Code Comprehensibility introduced by
58% of this comment could be valid code. Did you maybe forget this after debugging?

Sometimes obsolete code just ends up commented out instead of removed. In this case it is better to remove the code once you have checked you do not need it.

The code might also have been commented out for debugging purposes. In this case it is vital that someone uncomments it again or your project may behave in very unexpected ways in production.

This check looks for comments that seem to be mostly valid code and reports them.

Loading history...
25
#		$this->markTestIncomplete('use the vagrant box...');
26
#	}
27
28
	public function testCreateDatabase(){
29
		$this->assertSame(
30
			'CREATE DATABASE querytest DEFAULT CHARACTER SET UTF8',
31
			$this->createDatabase()->sql()
32
		);
33
34
		$this->assertSame(
35
			'CREATE DATABASE querytest 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
42
		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...
43
		var_dump($this->createTable()->execute());
44
		$this->markTestIncomplete();
45
	}
46
47
}
48