File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -197,18 +197,19 @@ public function _before(TestInterface $test)
197197 public function _after (TestInterface $ test )
198198 {
199199 if ($ this ->config ['cleanup ' ] && isset ($ this ->di ['db ' ])) {
200- while ($ this ->di ['db ' ]->isUnderTransaction ()) {
201- $ level = $ this ->di ['db ' ]->getTransactionLevel ();
200+ $ db = $ this ->di ['db ' ];
201+ while ($ db ->isUnderTransaction ()) {
202+ $ level = $ db ->getTransactionLevel ();
202203 try {
203- $ this -> di [ ' db ' ] ->rollback (true );
204+ $ db ->rollback (true );
204205 $ this ->debugSection ('Database ' , 'Transaction cancelled; all changes reverted. ' );
205206 } catch (PDOException $ e ) {
206207 }
207- if ($ level == $ this -> di [ ' db ' ] ->getTransactionLevel ()) {
208+ if ($ level == $ db ->getTransactionLevel ()) {
208209 break ;
209210 }
210211 }
211- $ this -> di [ ' db ' ] ->close ();
212+ $ db ->close ();
212213 }
213214 $ this ->di = null ;
214215 Di::reset ();
You can’t perform that action at this time.
0 commit comments