Exemplo n.º 1
0
 public function testIsActive_rollback()
 {
     $this->assertEquals(FALSE, CRM_Core_Transaction::isActive());
     $this->assertEquals(TRUE, CRM_Core_Transaction::willCommit());
     $tx = new CRM_Core_Transaction();
     $this->assertEquals(TRUE, CRM_Core_Transaction::isActive());
     $this->assertEquals(TRUE, CRM_Core_Transaction::willCommit());
     $tx->rollback();
     $this->assertEquals(TRUE, CRM_Core_Transaction::isActive());
     $this->assertEquals(FALSE, CRM_Core_Transaction::willCommit());
     $tx = NULL;
     $this->assertEquals(FALSE, CRM_Core_Transaction::isActive());
     $this->assertEquals(TRUE, CRM_Core_Transaction::willCommit());
 }