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.
1 parent 64a5e74 commit 1c1cf4aCopy full SHA for 1c1cf4a
1 file changed
tests/Unit/Providers/FooTest.php
@@ -52,9 +52,11 @@ public static function dataProviderForGetDateTime(): array
52
#[Test]
53
public function checkMockFinalClass(): void
54
{
55
- self::assertEquals('pong', (new Foo())->ping());
+ $instance = new Foo();
56
57
- $mock = $this->createMock(Foo::class);
+ self::assertEquals('pong', $instance->ping());
58
+
59
+ $mock = $this->createMock(get_class($instance));
60
$mock->expects(self::once())->method('ping')->willReturn('knock knock');
61
62
self::assertEquals('knock knock', $mock->ping());
0 commit comments