Exemplo n.º 1
0
 /**
  * Build Filler class instance.
  *
  * @param array $data
  *
  * @return Filler_object
  */
 private function buildFillerClass($data)
 {
     $this->validateClassName($data->file_namespace);
     $connection_factory = new ConnectionFactory($data->config_path);
     $connection = $connection_factory->build($this->output, $data->errors);
     return new $data->file_namespace($connection);
 }
Exemplo n.º 2
0
 /**
  * Invalid database name in config file throws exception.
  *
  * @test
  * @expectedException Exception
  * @expectedExceptionMessage Database type not found!
  */
 public function invalid_database_name_throws_exception()
 {
     $connection_factory = new ConnectionFactory('tests/files/wrong_config.php');
     $connection_factory->build(new ConsoleOutput(), false);
 }