We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents f213818 + ba51f15 commit 3fc8efbCopy full SHA for 3fc8efb
tests/Unit/Services/DatabaseCheckerTest.php
@@ -32,11 +32,22 @@ public function testCheckStatus(
32
->getMock()
33
;
34
35
+ $pdoMock = $this
36
+ ->getMockBuilder(\PDO::class)
37
+ ->disableOriginalConstructor()
38
+ ->onlyMethods(['prepare'])
39
+ ->getMock();
40
+
41
+ $pdoMock
42
+ ->expects($this->once())
43
+ ->method('prepare')
44
+ ->willReturn($this->createMock(\PDOStatement::class));
45
46
$databaseCheckerMock
47
->expects(static::once())
48
->method('createConnection')
49
->with(...$expectedPdoArgs)
- ->willReturn($this->createMock(\PDO::class))
50
+ ->willReturn($pdoMock)
51
52
53
$actualResult = $databaseCheckerMock->checkStatus();
0 commit comments