Skip to content

Commit

Permalink
Fix Frontend Title test
Browse files Browse the repository at this point in the history
  • Loading branch information
Maxime Rainville committed Jul 20, 2023
1 parent ca1c2a4 commit 7911dcd
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion tests/php/Models/LinkTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,8 @@ public function testSiteTreeLinkTitleFallback(): void
// The actual Database Title field should still be null
$this->assertNull($model->getField('Title'));
// But when we fetch the field (ViewableData) it should return the value from getTitle()
$this->assertEquals($page->Title, $model->Title, 'We expect to get the linked Page title');
$this->assertEmpty($model->Title, 'Link Title should be blank');
$this->assertEquals($page->Title, $model->FrontendTitle(), 'We expect to get the linked Page title');

$customTitle = 'My custom title';
$model->Title = $customTitle;
Expand Down

0 comments on commit 7911dcd

Please sign in to comment.