@@ 163-177 (lines=15) @@ | ||
160 | $this->_conn->rollbackSavepoint('foo'); |
|
161 | } |
|
162 | ||
163 | public function testTransactionBehaviorWithRollback() |
|
164 | { |
|
165 | try { |
|
166 | $this->_conn->beginTransaction(); |
|
167 | self::assertEquals(1, $this->_conn->getTransactionNestingLevel()); |
|
168 | ||
169 | throw new \Exception; |
|
170 | ||
171 | $this->_conn->commit(); // never reached |
|
172 | } catch (\Exception $e) { |
|
173 | self::assertEquals(1, $this->_conn->getTransactionNestingLevel()); |
|
174 | $this->_conn->rollBack(); |
|
175 | self::assertEquals(0, $this->_conn->getTransactionNestingLevel()); |
|
176 | } |
|
177 | } |
|
178 | ||
179 | public function testTransactionBehaviour() |
|
180 | { |
|
@@ 179-191 (lines=13) @@ | ||
176 | } |
|
177 | } |
|
178 | ||
179 | public function testTransactionBehaviour() |
|
180 | { |
|
181 | try { |
|
182 | $this->_conn->beginTransaction(); |
|
183 | self::assertEquals(1, $this->_conn->getTransactionNestingLevel()); |
|
184 | $this->_conn->commit(); |
|
185 | } catch (\Exception $e) { |
|
186 | $this->_conn->rollBack(); |
|
187 | self::assertEquals(0, $this->_conn->getTransactionNestingLevel()); |
|
188 | } |
|
189 | ||
190 | self::assertEquals(0, $this->_conn->getTransactionNestingLevel()); |
|
191 | } |
|
192 | ||
193 | public function testTransactionalWithException() |
|
194 | { |