mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 03:18:26 +00:00
test: Fixed improved return value of mocked PDO class exec() method.
Return value of PDO::exec() is the number of rows affected, which is 0 for any of these method calls.
This commit is contained in:
parent
7df7fefca4
commit
747f9e3d13
1 changed files with 4 additions and 4 deletions
|
@ -1425,10 +1425,10 @@ class DboSourceTest extends CakeTestCase {
|
|||
$db->nestedSupport = true;
|
||||
|
||||
$conn->expects($this->at(0))->method('beginTransaction')->will($this->returnValue(true));
|
||||
$conn->expects($this->at(1))->method('exec')->with($this->equalTo('SAVEPOINT LEVEL1'))->will($this->returnValue(true));
|
||||
$conn->expects($this->at(2))->method('exec')->with($this->equalTo('RELEASE SAVEPOINT LEVEL1'))->will($this->returnValue(true));
|
||||
$conn->expects($this->at(3))->method('exec')->with($this->equalTo('SAVEPOINT LEVEL1'))->will($this->returnValue(true));
|
||||
$conn->expects($this->at(4))->method('exec')->with($this->equalTo('ROLLBACK TO SAVEPOINT LEVEL1'))->will($this->returnValue(true));
|
||||
$conn->expects($this->at(1))->method('exec')->with($this->equalTo('SAVEPOINT LEVEL1'))->will($this->returnValue(0));
|
||||
$conn->expects($this->at(2))->method('exec')->with($this->equalTo('RELEASE SAVEPOINT LEVEL1'))->will($this->returnValue(0));
|
||||
$conn->expects($this->at(3))->method('exec')->with($this->equalTo('SAVEPOINT LEVEL1'))->will($this->returnValue(0));
|
||||
$conn->expects($this->at(4))->method('exec')->with($this->equalTo('ROLLBACK TO SAVEPOINT LEVEL1'))->will($this->returnValue(0));
|
||||
$conn->expects($this->at(5))->method('commit')->will($this->returnValue(true));
|
||||
|
||||
$this->_runTransactions($db);
|
||||
|
|
Loading…
Reference in a new issue