Skip to content

Commit

Permalink
MNT Update method signature for test class
Browse files Browse the repository at this point in the history
  • Loading branch information
GuySartorelli committed Aug 22, 2024
1 parent 6f84505 commit bbec24d
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion code/Report.php
Original file line number Diff line number Diff line change
Expand Up @@ -431,7 +431,7 @@ public function getReportField()
if ($item instanceof CMSPreviewable) {
return sprintf(
'<a class="grid-field__link-block" href="%s" title="%s">%s</a>',
Convert::raw2att($item->CMSEditLink()),
Convert::raw2att($item->getCMSEditLink()),
Convert::raw2att($value),
Convert::raw2xml($value)
);
Expand Down
4 changes: 2 additions & 2 deletions code/SideReportView.php
Original file line number Diff line number Diff line change
Expand Up @@ -95,8 +95,8 @@ protected function formatValue($record, $source, $info)
}

if (isset($info['link']) && $info['link']) {
$link = ($info['link'] === true && $record->hasMethod('CMSEditLink'))
? $record->CMSEditLink()
$link = ($info['link'] === true && $record->hasMethod('getCMSEditLink'))
? $record->getCMSEditLink()
: $info['link'];
return $prefix . "<a $classClause href=\"$link\">$val</a>";
} else {
Expand Down
2 changes: 1 addition & 1 deletion tests/ReportTest/FakeObject.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ public function Link()
return Controller::join_links('dummy-link', $this->ID);
}

public function CMSEditLink()
public function getCMSEditLink(): ?string
{
return Controller::join_links('dummy-edit-link', $this->ID);
}
Expand Down

0 comments on commit bbec24d

Please sign in to comment.