private function init()
{
if (!class_exists('PDO') || !in_array('sqlite', \PDO::getAvailableDrivers())) {
\PHPUnit_Framework_TestCase::markTestSkipped('This test requires SQLite support in your environment');
}
$config = new \Doctrine\ORM\Configuration();
$config->setEntityNamespaces(array('UebbHateoasBundle' => 'uebb\\HateoasBundle\\Tests\\Entity'));
$config->setAutoGenerateProxyClasses(true);
$config->setProxyDir(\sys_get_temp_dir());
$config->setProxyNamespace('UebbHateoasTests\\Doctrine');
$reader = new AnnotationReader();
$metadataDriver = new AnnotationDriver($reader, 'uebb\\HateoasBundle\\Tests\\Entity');
$config->setMetadataDriverImpl($metadataDriver);
$config->setQueryCacheImpl(new \Doctrine\Common\Cache\ArrayCache());
$config->setMetadataCacheImpl(new \Doctrine\Common\Cache\ArrayCache());
$params = array('driver' => 'pdo_sqlite', 'memory' => true);
$this->entityManager = EntityManager::create($params, $config);
$this->linkParser = $this->getMock('uebb\\HateoasBundle\\Service\\LinkParserInterface');
$this->linkResolver = $this->getMock('uebb\\HateoasBundle\\Service\\LinkResolverInterface');
$this->dispatcher = $this->getMock('Symfony\\Component\\EventDispatcher\\EventDispatcherInterface');
$this->formResolver = new FormResolver($this->factory, $reader);
$this->queryParser = $this->getMock('uebb\\HateoasBundle\\Service\\QueryParserInterface');
$this->serializer = $this->getMock('JMS\\Serializer\\SerializerInterface');
$this->validator = $this->getMock('Symfony\\Component\\Validator\\Validator\\ValidatorInterface');
$this->requestProcessor = new RequestProcessor($this->entityManager, $this->linkParser, $this->linkResolver, $this->formResolver, $this->dispatcher, $this->queryParser, $this->serializer, $this->validator);
}