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

public __construct ( $dsn, $user = NULL, $password = NULL, array $options = NULL )
$options array
 public function __construct($dsn, $user = NULL, $password = NULL, array $options = NULL)
 {
     $container = \Testbench\ContainerFactory::create(FALSE);
     $this->onConnect[] = function (NetteDatabaseConnectionMock $connection) use($container) {
         if ($this->__testbench_databaseName !== NULL) {
             //already initialized (needed for pgsql)
             return;
         }
         try {
             $config = $container->parameters['testbench'];
             if ($config['shareDatabase'] === TRUE) {
                 $registry = new \Testbench\DatabasesRegistry();
                 $dbName = $container->parameters['testbench']['dbprefix'] . getenv(\Tester\Environment::THREAD);
                 if ($registry->registerDatabase($dbName)) {
                     $this->__testbench_database_setup($connection, $container, TRUE);
                 } else {
                     $this->__testbench_databaseName = $dbName;
                     $this->__testbench_database_change($connection, $container);
                 }
             } else {
                 // always create new test database
                 $this->__testbench_database_setup($connection, $container);
             }
         } catch (\Exception $e) {
             \Tester\Assert::fail($e->getMessage());
         }
     };
     parent::__construct($dsn, $user, $password, $options);
 }