public function testEndTestRollsBackTransaction()
 {
     $listener = new TransactionalFixtureTestListener();
     $mockAdapter = $this->getMockAdapter();
     $mockAdapter->expects($this->once())->method('rollback');
     Configuration::$adapter = $mockAdapter;
     $listener->endTest($this->getMockTest(), null);
 }
 public function testPersistWithoutFlush()
 {
     $entityManager = $this->getMockEntityManager();
     Configuration::$adapter = new DoctrineAdapter($entityManager, false);
     $entityManager->expects($this->once())->method('persist')->with($this->isInstanceOf('Fixture\\Carpenter\\DoctrineUser'));
     $entityManager->expects($this->never())->method('flush');
     Factory::create('DoctrineUser');
 }