public function testNestedTransactionUsingDifferentConnections()
 {
     DbTransaction::run(function () {
         DbClient::connect('backup');
         DbTransaction::run(function () {
             $this->assertTrue(DbClient::inTransaction());
         });
         $this->assertFalse(DbClient::inTransaction());
         DbClient::connect();
         $this->assertTrue(DbClient::inTransaction());
     });
     $this->assertFalse(DbClient::inTransaction());
 }
 public function testInTransaction()
 {
     $this->mockEngineMethod('inTransaction')->will($this->returnValue(true));
     $this->assertTrue(DbClient::inTransaction());
 }