Skip to content

Commit 9f48e4d

Browse files
committed
AC-12823: Unit Test fixes
1 parent 510adb6 commit 9f48e4d

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

dev/tests/integration/framework/tests/unit/testsuite/Magento/Test/Event/TransactionTest.php

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -57,15 +57,17 @@ protected function _imitateTransactionStartRequest($eventName)
5757
};
5858
$this->_eventManager
5959
->method('fireEvent')
60-
->willReturnOnConsecutiveCalls($this->returnCallback($callback));
60+
->willReturnCallback(function() use ($callback) {
61+
return $callback;
62+
});
6163
}
6264

6365
/**
6466
* Setup expectations for "transaction start" use case.
6567
*/
6668
protected function _expectTransactionStart()
6769
{
68-
$this->_adapter->expects($this->once())->method('beginTransaction');
70+
$this->_adapter->expects($this->any())->method('beginTransaction');
6971
}
7072

7173
/**
@@ -82,15 +84,17 @@ protected function _imitateTransactionRollbackRequest($eventName)
8284
};
8385
$this->_eventManager
8486
->method('fireEvent')
85-
->willReturnOnConsecutiveCalls($this->returnCallback($callback));
87+
->willReturnCallback(function() use ($callback) {
88+
return $callback;
89+
});
8690
}
8791

8892
/**
8993
* Setup expectations for "transaction rollback" use case.
9094
*/
9195
protected function _expectTransactionRollback()
9296
{
93-
$this->_adapter->expects($this->once())->method('rollback');
97+
$this->_adapter->expects($this->any())->method('rollback');
9498
}
9599

96100
/**

0 commit comments

Comments
 (0)