Skip to content

Commit

Permalink
Adjust unit tests for d9 and d10
Browse files Browse the repository at this point in the history
  • Loading branch information
pookmish committed Sep 11, 2023
1 parent 5be6607 commit 8165970
Showing 1 changed file with 10 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ abstract class FieldFormatterTestBase extends UnitTestCase {
/**
* {@inheritDoc}
*/
public function setup(): void {
public function setUp(): void {
parent::setUp();
$path_matcher = $this->createMock(PathMatcherInterface::class);
$path_matcher->method('isFrontPage')
Expand All @@ -28,7 +28,10 @@ public function setup(): void {
$path_validator = $this->createMock(PathValidatorInterface::class);

$link_generator = $this->createMock(LinkGeneratorInterface::class);

$link_generator->method('generate')
->will($this->returnCallback([$this, 'generateLink']));
$link_generator->method('generateFromLink')
->will($this->returnCallback([$this, 'generateFromLinkCallback']));

$this->container = new ContainerBuilder();
Expand All @@ -43,7 +46,12 @@ public function isFrontPageCallback() {
return $this->isFrontPage;
}

public function generateFromLinkCallback($text, Url $url) {
public function generateLink($text, Url $url) {
return '<a href="/foo-bar">Foo Bar</a>';
}


public function generateFromLinkCallback(Link $link) {
return '<a href="/foo-bar">Foo Bar</a>';
}

Expand Down

0 comments on commit 8165970

Please sign in to comment.