Skip to content

Commit 8f2e59d

Browse files
committed
fix PHPUnit 12.5.0 notices in tests - use stubs instead of mocks
1 parent f9491b6 commit 8f2e59d

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

tests/MockDisablerTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ public function testCallback()
3838
{
3939
$executed = false;
4040
$executedWith = null;
41-
$mock = $this->createMock(Deactivatable::class);
41+
$mock = $this->createStub(Deactivatable::class);
4242
$disabler = new MockDisabler($mock, static function ($disabler) use (&$executed, &$executedWith) {
4343
self::assertInstanceOf(MockDisabler::class, $disabler);
4444

tests/MockObjectProxyTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ class MockObjectProxyTest extends TestCase
3333
*/
3434
public function testExpects()
3535
{
36-
$matcher = $this->getMockBuilder(Invocation::class)->getMock();
36+
$matcher = $this->createStub(Invocation::class);
3737

3838
if (class_exists(ConfigurableMethod::class)) {
3939
if (class_exists(\PHPUnit\Runner\Version::class)

0 commit comments

Comments
 (0)