testGivenCustomProxyDir_itIsPassedToProxyGenerator()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

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