Passed
Push — master ( 1a5f01...95cf58 )
by Aimeos
09:39
created

NoneTest   A

Complexity

Total Complexity 9

Size/Duplication

Total Lines 63
Duplicated Lines 0 %

Importance

Changes 2
Bugs 0 Features 0
Metric Value
wmc 9
eloc 18
c 2
b 0
f 0
dl 0
loc 63
rs 10

9 Methods

Rating   Name   Duplication   Size   Complexity  
A tearDown() 0 3 1
A setUp() 0 3 1
A testRollback() 0 4 1
A testGetRawObject() 0 4 1
A testCreate() 0 4 1
A testBegin() 0 4 1
A testClose() 0 4 1
A testConnect() 0 4 1
A testCommit() 0 4 1
1
<?php
2
3
/**
4
 * @license LGPLv3, https://opensource.org/licenses/LGPL-3.0
5
 * @copyright Aimeos (aimeos.org), 2016-2022
6
 */
7
8
namespace Aimeos\Base\DB\Connection;
9
10
11
class NoneTest extends \PHPUnit\Framework\TestCase
12
{
13
	private $object;
14
15
16
	protected function setUp() : void
17
	{
18
		$this->object = new \Aimeos\Base\DB\Connection\None();
19
	}
20
21
22
	protected function tearDown() : void
23
	{
24
		unset( $this->object );
25
	}
26
27
28
	public function testClose()
29
	{
30
		$this->expectException( \Aimeos\Base\DB\Exception::class );
31
		$this->object->close();
32
	}
33
34
35
	public function testConnect()
36
	{
37
		$this->expectException( \Aimeos\Base\DB\Exception::class );
38
		$this->object->connect();
39
	}
40
41
42
	public function testCreate()
43
	{
44
		$this->expectException( \Aimeos\Base\DB\Exception::class );
45
		$this->object->create( 'SELECT' );
46
	}
47
48
49
	public function testGetRawObject()
50
	{
51
		$this->expectException( \Aimeos\Base\DB\Exception::class );
52
		$this->object->getRawObject();
53
	}
54
55
56
	public function testBegin()
57
	{
58
		$this->expectException( \Aimeos\Base\DB\Exception::class );
59
		$this->object->begin();
60
	}
61
62
63
	public function testCommit()
64
	{
65
		$this->expectException( \Aimeos\Base\DB\Exception::class );
66
		$this->object->commit();
67
	}
68
69
70
	public function testRollback()
71
	{
72
		$this->expectException( \Aimeos\Base\DB\Exception::class );
73
		$this->object->rollback();
74
	}
75
}
76