Skip to content

Commit

Permalink
Refactor RSS_File_ItemTest to allow overriding the default expected s…
Browse files Browse the repository at this point in the history
…ubtitle
  • Loading branch information
ben-xo committed Feb 13, 2021
1 parent ed44bbd commit e613823
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion test/RSS_File_ItemTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,11 @@ public function getDefaultTitle()
return $this->default_title_from_file;
}

public function getDefaultSubtitle()
{
return '';
}

public function setUp(): void
{
// most common case for tests in this file.
Expand Down Expand Up @@ -168,7 +173,7 @@ public function test_summary_from_filesystem_dot_only() {
// test subtitle default
public function test_subtitle_default() {
$item = $this->newRSSItem();
$this->assertEquals('', $item->getSubtitle());
$this->assertEquals($this->getDefaultSubtitle(), $item->getSubtitle());
}

// test subtitle override
Expand Down

0 comments on commit e613823

Please sign in to comment.