Example #1
0
 public function testStartsTransactionWithOverrideConfig()
 {
     $driver = $this->getMock('Orno\\Db\\Driver\\Pdo');
     $config = ['database' => 'database', 'username' => 'username', 'password' => 'password'];
     $driver->expects($this->once())->method('transaction')->will($this->returnValue($driver));
     $driver->expects($this->once())->method('connect')->with($this->equalTo($config))->will($this->returnValue($driver));
     $q = new Query($driver, $config);
     $this->assertInstanceOf('Orno\\Db\\Query', $q->transaction());
 }