PHP code example of lzakrzewski / doctrine-database-backup
1. Go to this page and download the library: Download lzakrzewski/doctrine-database-backup library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
lzakrzewski / doctrine-database-backup example snippets
/** {@inheritdoc} */
protected function setUp()
{
parent::setUp();
$this->entityManager = $this->createEntityManager();
$backup = new DoctrineDatabaseBackup($this->entityManager);
$backup->restore();
}
/** @BeforeScenario*/
public function restoreDatabase()
{
// "getEntityManager" is your own getter for EntityManager
$backup = new DoctrineDatabaseBackup($this->getEntityManager());
$backup->restore();
}
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.