for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
declare( strict_types = 1 );
namespace WMDE\Fundraising\Store\Tests;
use Doctrine\DBAL\DriverManager;
use WMDE\Fundraising\Store\Factory;
/**
* @licence GNU GPL v2+
* @author Kai Nissen < [email protected] >
*/
class FactoryTest extends \PHPUnit_Framework_TestCase {
const PROXY_PATH = '/path/to/proxy/classes/';
public function testGivenCustomProxyDir_itIsPassedToProxyGenerator() {
$factory = new Factory( $this->newConnection(), self::PROXY_PATH );
$this->assertSame( self::PROXY_PATH, $factory->getEntityManager()->getConfiguration()->getProxyDir() );
}
private function newConnection() {
return DriverManager::getConnection( [ 'driver' => 'pdo_sqlite', 'memory' => true ] );