protected function setUp()
 {
     if (!extension_loaded('redis')) {
         $this->markTestSkipped('Redis extension is not loaded');
     }
     parent::setUp();
     static::$kernel = static::createKernel();
     static::$kernel->boot();
     $container = static::$kernel->getContainer();
     /** @var ManagerRegistry $doctrine */
     $doctrine = $container->get('doctrine');
     /** @var EntityManager $em */
     $em = $doctrine->getManager();
     // create database and load schema
     $schemaTool = new SchemaTool($em);
     $schemaTool->dropDatabase();
     $schemaTool->createSchema($em->getMetadataFactory()->getAllMetadata());
     /* @var EntityCache $entityCache */
     $this->cache = $container->get('tree_house_cache.orm.entity_cache');
     $this->cache->clear();
     $this->ormCache = $em->getConfiguration()->getResultCacheImpl();
     $this->entity = new EntityMock(1234);
     $this->entityCacheKey = $this->cache->getEntityKey($this->entity);
     $this->entityCacheClass = $this->cache->getEntityClassKey($this->entity);
     $em->persist($this->entity);
     $em->flush($this->entity);
 }