Skip to content

Commit 3c727f8

Browse files
committed
refactor(tests): getMockForAbstractClass is deprecated
Signed-off-by: Ferdinand Thiessen <[email protected]>
1 parent 70569d4 commit 3c727f8

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

tests/lib/Template/ResourceLocatorTest.php

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,13 @@ public function getResourceLocator(string $theme): ResourceLocator&MockObject {
3232
->method('getSystemValueString')
3333
->with('theme', '')
3434
->willReturn($theme);
35-
return $this->getMockForAbstractClass(ResourceLocator::class,
36-
[$this->logger, $this->config],
37-
'', true, true, true, []);
35+
return $this->getMockBuilder(ResourceLocator::class)
36+
->onlyMethods(['doFind', 'doFindTheme'])
37+
->setConstructorArgs(
38+
[$this->logger, $this->config],
39+
'', true, true, true, []
40+
)
41+
->getMock();
3842
}
3943

4044
public function testFind(): void {

0 commit comments

Comments
 (0)