Skip to content

Commit

Permalink
Update unit tests to not test titles unnecessarily
Browse files Browse the repository at this point in the history
  • Loading branch information
ben-xo committed Feb 13, 2021
1 parent ddab6c4 commit 60de169
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions test/RSS_File_ItemTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ public function test_constructor_sets_default_properties_from_filename()
{
$item = $this->newRSSItem();
$this->assertEquals('example.mp3', $item->getFilename());
$this->assertEquals('example.mp3', $item->getTitle());
$this->assertEquals($this->getDefaultTitle(), $item->getTitle());
$this->assertEquals('http://www.example.com/mp3/example.mp3', $item->getLink());
$this->assertEquals('application/octet-stream', $item->getType());
}
Expand All @@ -33,23 +33,20 @@ public function test_filename_with_full_path()
{
$item = new RSS_File_Item(getcwd() . '/example.mp3');
$this->assertEquals(getcwd() . '/example.mp3', $item->getFilename());
$this->assertEquals('example.mp3', $item->getTitle());
$this->assertEquals('http://www.example.com/mp3/example.mp3', $item->getLink());
}

public function test_filename_without_extension()
{
$item = new RSS_File_Item('example');
$this->assertEquals('example', $item->getFilename());
$this->assertEquals('example', $item->getTitle());
$this->assertEquals('http://www.example.com/mp3/example', $item->getLink());
}

public function test_filename_with_full_path_without_extension()
{
$item = new RSS_File_Item(getcwd() . '/example');
$this->assertEquals(getcwd() . '/example', $item->getFilename());
$this->assertEquals('example', $item->getTitle());
$this->assertEquals('http://www.example.com/mp3/example', $item->getLink());
}

Expand Down

0 comments on commit 60de169

Please sign in to comment.