Skip to content
Snippets Groups Projects
Commit 2ad00369 authored by Joseph Olstad's avatar Joseph Olstad
Browse files

Issue #3455186 by cmlara, joseph.olstad - Refactor tests for D11 phpunit 10+...

Issue #3455186 by cmlara, joseph.olstad - Refactor tests for D11 phpunit 10+ compatibility refactoring test.
parent 725b47d7
No related branches found
No related tags found
No related merge requests found
Pipeline #333188 failed
......@@ -111,7 +111,7 @@ class CshsGroupByRootFormatterUnitTest extends UnitTestCase {
* The stubbed term object.
*/
protected function createMockTerm(int $id, string $label, Link $link, $parent = NULL): ContentEntityInterface {
$term_mock = $this->getMockBuilder(ContentEntityInterface::class)
$term_mock = $this->getMockBuilder(Term::class)
->disableOriginalConstructor()
->onlyMethods([
'id',
......@@ -124,6 +124,7 @@ class CshsGroupByRootFormatterUnitTest extends UnitTestCase {
'set',
'get',
'hasField',
'loadAllParents',
])
->getMock();
......@@ -137,6 +138,7 @@ class CshsGroupByRootFormatterUnitTest extends UnitTestCase {
$term_mock->method('set')->willReturnSelf();
$term_mock->method('get')->willReturn(NULL);
$term_mock->method('hasField')->willReturn(FALSE);
$term_mock->method('loadAllParents')->willReturn([]);
return $term_mock;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment