Example #1
0
 public function testDivertSlaveToMasterWhenNotConfigured()
 {
     $config = $this->config;
     $config['database']['development']['slave'] = null;
     $app = new App($config, uniqid(rand()));
     $connection = new Connection($app);
     $master = $connection->getMasterPdo();
     $slave = $connection->getSlavePdo();
     $this->assertEquals($slave, $master);
 }
Example #2
0
 /**
  * PdoAdapter class constructor.
  */
 public function __construct()
 {
     parent::__construct();
     if (empty($this->conn)) {
         $this->conn = $this->getDatabaseConnection();
     }
 }