FactoryTest   A
last analyzed

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
lcom 0
cbo 5
dl 0
loc 14
rs 10
c 0
b 0
f 0

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 PHPUnit\Framework\TestCase;
9
use WMDE\Fundraising\Store\Factory;
10
11
/**
12
 * @licence GNU GPL v2+
13
 * @author Kai Nissen < [email protected] >
14
 */
15
class FactoryTest extends TestCase {
16
17
	private const PROXY_PATH = '/path/to/proxy/classes/';
18
19
	public function testGivenCustomProxyDir_itIsPassedToProxyGenerator() {
20
		$factory = new Factory( $this->newConnection(), self::PROXY_PATH );
21
		$this->assertSame( self::PROXY_PATH, $factory->getEntityManager()->getConfiguration()->getProxyDir() );
0 ignored issues
show
Deprecated Code introduced by
The method Doctrine\ORM\Configuration::getProxyDir() has been deprecated with message: 2.7 We're switch to `ocramius/proxy-manager` and this method isn't applicable any longer

This method has been deprecated. The supplier of the class has supplied an explanatory message.

The explanatory message should give you some clue as to whether and when the method will be removed from the class and what other method or class to use instead.

Loading history...
22
	}
23
24
	private function newConnection() {
25
		return DriverManager::getConnection( [ 'driver' => 'pdo_sqlite', 'memory' => true ] );
26
	}
27
28
}
29