/** * Prepares the environment before running a test. */ protected function setUp() { parent::setUp(); bootstrap::dropAndCreateDatabase(); $this->_em = bootstrap::getEntityManager(); $this->doctrineORM = new DoctrineORM($this->_em, array()); $this->assertInstanceOf('\\ImmutableStateStatusTracker\\StorageAdapterInterface', $this->doctrineORM); }
<?php use Doctrine\DBAL\Tools\Console\ConsoleRunner; use Doctrine\ORM\Tools\Console\Helper\EntityManagerHelper; use ImmutableStateStatusTracker\bootstrap; require_once __DIR__ . '/bootstrap.php'; $entityManager = bootstrap::getEntityManager(); $helperSet = ConsoleRunner::createHelperSet($entityManager->getConnection()); $helperSet->set(new EntityManagerHelper($entityManager), 'em'); return $helperSet;