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); }
/** * PdoAdapter class constructor. */ public function __construct() { parent::__construct(); if (empty($this->conn)) { $this->conn = $this->getDatabaseConnection(); } }