Completed
Push — master ( 0637f4...76cfc1 )
by Gabriel
33s
created

FactoryTest   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 14
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 5

Importance

Changes 0
Metric Value
wmc 2
c 0
b 0
f 0
lcom 0
cbo 5
dl 0
loc 14
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A testGivenCustomProxyDir_itIsPassedToProxyGenerator() 0 4 1
A newConnection() 0 3 1
1
<?php
2
3
declare( strict_types = 1 );
4
5
namespace WMDE\Fundraising\Store\Tests;
6
7
use Doctrine\DBAL\DriverManager;
8
use WMDE\Fundraising\Store\Factory;
9
10
/**
11
 * @licence GNU GPL v2+
12
 * @author Kai Nissen < [email protected] >
13
 */
14
class FactoryTest extends \PHPUnit_Framework_TestCase {
15
16
	const PROXY_PATH = '/path/to/proxy/classes/';
17
18
	public function testGivenCustomProxyDir_itIsPassedToProxyGenerator() {
19
		$factory = new Factory( $this->newConnection(), self::PROXY_PATH );
20
		$this->assertSame( self::PROXY_PATH, $factory->getEntityManager()->getConfiguration()->getProxyDir() );
21
	}
22
23
	private function newConnection() {
24
		return DriverManager::getConnection( [ 'driver' => 'pdo_sqlite', 'memory' => true ] );
25
	}
26
27
}
28