/** * End-of-test cleanup */ protected function tearDown() { parent::tearDown(); $this->entityManager->close(); $this->entityManager = null; // avoid memory leaks }