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()); }