public function testTransactionRemovedOnRollback()
{
$this->specify("Test does not remove transaction when rolled back", function () {
$tm = new Manager();
$transaction = $tm->get(true);
$select = new Select();
$select->setTransaction($transaction);
$select->create(['name' => 'Crack of Dawn']);
expect($this->tester->getProtectedProperty($tm, '_number'))->equals(1);
expect($this->tester->getProtectedProperty($tm, '_transactions'))->count(1);
try {
$transaction->rollback();
} catch (Failed $e) {
// do nothing
}
expect($this->tester->getProtectedProperty($tm, '_number'))->equals(0);
expect($this->tester->getProtectedProperty($tm, '_transactions'))->count(0);
});
}