Skip to content
Snippets Groups Projects
Commit d1e24519 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 c5e530dd
No related branches found
No related tags found
No related merge requests found
Pipeline #332591 failed
......@@ -111,33 +111,35 @@ class CshsGroupByRootFormatterUnitTest extends UnitTestCase {
$link = $this->createMock(Link::class);
$link->method('toString')->willReturn(static::getGeneratedLink($name));
// Use an anonymous class to handle dynamic properties.
$term = new class() implements TermInterface {
public $parent;
public $target_id;
// Use an anonymous class to handle dynamic properties with the correct method signature.
$term = new class() implements TermInterface {
public $parent;
public $target_id;
public $label;
public $link;
/**
*
*/
public function id() {
return $this->target_id;
}
/**
*
*/
public function label() {
public function id() {
return $this->target_id;
}
/**
*
*/
public function label() {
return $this->label;
}
}
/**
*
*/
public function toLink() {
/**
*
*/
public function toLink($text = NULL, $rel = 'canonical', array $options = []) {
return $this->link;
}
}
};
};
$term->target_id = $this->getFixedTermId($name);
$term->label = $name;
......
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