Passed
Push — master ( 78ff77...606203 )
by Aimeos
04:53
created

NoneTest   A

Complexity

Total Complexity 8

Size/Duplication

Total Lines 56
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 8
eloc 16
dl 0
loc 56
rs 10
c 0
b 0
f 0

8 Methods

Rating   Name   Duplication   Size   Complexity  
A tearDown() 0 3 1
A testRollback() 0 4 1
A testGetRawObject() 0 4 1
A testCreate() 0 4 1
A setUp() 0 3 1
A testBegin() 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 testConnect()
29
	{
30
		$this->expectException( \Aimeos\Base\DB\Exception::class );
31
		$this->object->connect();
32
	}
33
34
35
	public function testCreate()
36
	{
37
		$this->expectException( \Aimeos\Base\DB\Exception::class );
38
		$this->object->create( 'SELECT' );
39
	}
40
41
42
	public function testGetRawObject()
43
	{
44
		$this->expectException( \Aimeos\Base\DB\Exception::class );
45
		$this->object->getRawObject();
46
	}
47
48
49
	public function testBegin()
50
	{
51
		$this->expectException( \Aimeos\Base\DB\Exception::class );
52
		$this->object->begin();
53
	}
54
55
56
	public function testCommit()
57
	{
58
		$this->expectException( \Aimeos\Base\DB\Exception::class );
59
		$this->object->commit();
60
	}
61
62
63
	public function testRollback()
64
	{
65
		$this->expectException( \Aimeos\Base\DB\Exception::class );
66
		$this->object->rollback();
67
	}
68
}
69