Neos\Flow\Persistence\Doctrine\PersistenceManager::tearDown PHP Метод

tearDown() публичный Метод

Called after a functional test in Flow, dumps everything in the database.
public tearDown ( ) : void
Результат void
    public function tearDown()
    {
        // "driver" is used only for Doctrine, thus we (mis-)use it here
        // additionally, when no path is set, skip this step, assuming no DB is needed
        if ($this->settings['backendOptions']['driver'] !== null && $this->settings['backendOptions']['path'] !== null) {
            $this->entityManager->clear();
            $schemaTool = new SchemaTool($this->entityManager);
            $schemaTool->dropDatabase();
            $this->systemLogger->log('Doctrine 2 schema destroyed.', LOG_NOTICE);
        } else {
            $this->systemLogger->log('Doctrine 2 destroy skipped, driver and path backend options not set!', LOG_NOTICE);
        }
    }