diff --git a/tests/Database/DatabaseConnectionTest.php b/tests/Database/DatabaseConnectionTest.php index 2be19458ed62..5b15010625f4 100755 --- a/tests/Database/DatabaseConnectionTest.php +++ b/tests/Database/DatabaseConnectionTest.php @@ -62,7 +62,7 @@ public function testSelectProperlyCallsPDO() $writePdo = $this->getMockBuilder(DatabaseConnectionTestMockPDO::class)->onlyMethods(['prepare'])->getMock(); $writePdo->expects($this->never())->method('prepare'); $statement = $this->getMockBuilder('PDOStatement') - ->setMethods(['setFetchMode', 'execute', 'fetchAll', 'bindValue']) + ->onlyMethods(['setFetchMode', 'execute', 'fetchAll', 'bindValue']) ->getMock(); $statement->expects($this->once())->method('setFetchMode'); $statement->expects($this->once())->method('bindValue')->with('foo', 'bar', 2); diff --git a/tests/Validation/ValidationValidatorTest.php b/tests/Validation/ValidationValidatorTest.php index a2319b4cfa8e..2522f397f4f6 100755 --- a/tests/Validation/ValidationValidatorTest.php +++ b/tests/Validation/ValidationValidatorTest.php @@ -2872,7 +2872,7 @@ public function testValidateImage() $v = new Validator($trans, ['x' => $file7], ['x' => 'Image']); $this->assertTrue($v->passes()); - $file2 = $this->getMockBuilder(UploadedFile::class)->setMethods(['guessExtension', 'getClientOriginalExtension'])->setConstructorArgs($uploadedFile)->getMock(); + $file2 = $this->getMockBuilder(UploadedFile::class)->onlyMethods(['guessExtension', 'getClientOriginalExtension'])->setConstructorArgs($uploadedFile)->getMock(); $file2->expects($this->any())->method('guessExtension')->willReturn('jpg'); $file2->expects($this->any())->method('getClientOriginalExtension')->willReturn('jpg'); $v = new Validator($trans, ['x' => $file2], ['x' => 'Image']);