Completed
Pull Request — master (#120)
by
unknown
02:24
created

testGivenCustomProxyDir_itIsPassedToProxyGenerator()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
c 0
b 0
f 0
dl 0
loc 4
rs 10
cc 1
eloc 3
nc 1
nop 0
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