Doctrine\DBAL\Migrations\Configuration\Configuration::validate PHP Method

validate() public method

Validation that this instance has all the required properties configured
public validate ( )
    public function validate()
    {
        if (!$this->migrationsNamespace) {
            throw MigrationException::migrationsNamespaceRequired();
        }
        if (!$this->migrationsDirectory) {
            throw MigrationException::migrationsDirectoryRequired();
        }
    }

Usage Example

 public function testValidateMigrations()
 {
     $config = new Configuration($this->getSqliteConnection());
     $config->setMigrationsNamespace("DoctrineMigrations\\");
     $config->setMigrationsDirectory(sys_get_temp_dir());
     $config->validate();
 }