Skip to content

Commit

Permalink
Fix unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
wtfzdotnet committed Aug 18, 2021
1 parent 9467619 commit e800d43
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion examples/tv/model/show.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,4 @@
$repository = new TvRepository($client);
$tvShow = $repository->load(1396);

var_dump($tvShow);
var_dump($tvShow->getLanguages());
10 changes: 5 additions & 5 deletions test/Tmdb/Tests/Helper/ImageHelperTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ public function shouldConstructImageElement()
$image->setHeight(75);

$this->assertEquals(
'<img src="//image.tmdb.org/t/p/w45/1NfhdnQAEqcBRCulEhOFSkRrrLv.jpg" width="90" height="70" />',
'<img src="//image.tmdb.org/t/p/w45/1NfhdnQAEqcBRCulEhOFSkRrrLv.jpg" width="90" height="70" title="" alt=""/>',
$this->helper->getHtml($image, 'w45', 90, 70)
);
}
Expand All @@ -105,7 +105,7 @@ public function shouldReadImageDimensions()
$image->setHeight(75);

$this->assertEquals(
'<img src="//image.tmdb.org/t/p/w45/1NfhdnQAEqcBRCulEhOFSkRrrLv.jpg" width="100" height="75" />',
'<img src="//image.tmdb.org/t/p/w45/1NfhdnQAEqcBRCulEhOFSkRrrLv.jpg" width="100" height="75" title="" alt=""/>',
$this->helper->getHtml($image, 'w45')
);
}
Expand All @@ -123,12 +123,12 @@ public function shouldCalculateDimensions()
$image->setAspectRatio(1.25);

$this->assertEquals(
'<img src="//image.tmdb.org/t/p/w45/1NfhdnQAEqcBRCulEhOFSkRrrLv.jpg" width="63" height="50" />',
'<img src="//image.tmdb.org/t/p/w45/1NfhdnQAEqcBRCulEhOFSkRrrLv.jpg" width="63" height="50" title="" alt=""/>',
$this->helper->getHtml($image, 'w45', null, 50)
);

$this->assertEquals(
'<img src="//image.tmdb.org/t/p/w45/1NfhdnQAEqcBRCulEhOFSkRrrLv.jpg" width="63" height="50" />',
'<img src="//image.tmdb.org/t/p/w45/1NfhdnQAEqcBRCulEhOFSkRrrLv.jpg" width="63" height="50" title="" alt=""/>',
$this->helper->getHtml($image, 'w45', 63)
);
}
Expand Down Expand Up @@ -161,7 +161,7 @@ public function shouldGetImageElementByString()
$imageUrl = $this->helper->getHtml('/1NfhdnQAEqcBRCulEhOFSkRrrLv.jpg');

$this->assertEquals(
'<img src="//image.tmdb.org/t/p/original/1NfhdnQAEqcBRCulEhOFSkRrrLv.jpg" width="" height="" />',
'<img src="//image.tmdb.org/t/p/original/1NfhdnQAEqcBRCulEhOFSkRrrLv.jpg" width="" height="" title="" alt=""/>',
$imageUrl
);
}
Expand Down

0 comments on commit e800d43

Please sign in to comment.