public function testTransactionCommitBeforeAnyQueries() { //There is a validation that we can start transaction //before any queries and connection object will establish //connection automatically (lazy connection) $this->connection->start(); $this->connection->execute('SELECT 1'); $this->connection->commit(); $this->assertTrue(true); }
/** * Creates connection instance * All parameters are necessary * @param $host * @param $port * @param $user * @param $password * @param $database */ public function __construct($host, $port, $user, $password, $database) { parent::__construct(); $this->host = $host; $this->port = $port; $this->user = $user; $this->password = $password; $this->database = $database; }