Skip to content

Commit

Permalink
TvSeason coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
wtfzdotnet committed Feb 8, 2014
1 parent 259981a commit 9c630c9
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 0 deletions.
13 changes: 13 additions & 0 deletions test/Tmdb/Tests/Factory/TvSeasonFactoryTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,19 @@ public function shouldBeAbleToSetFactories()
$this->assertInstanceOf('stdClass', $factory->getTvEpisodeFactory());
}

/**
* @test
*/
public function shouldBeFunctional()
{
$this->assertEquals(new \DateTime('2009-03-08'), $this->season->getAirDate());
$this->assertEquals('Season 2', $this->season->getName());
$this->assertEquals('The second season of the American television drama series Breaking Bad premiered on March 8, 2009 and concluded on May 31, 2009. It consisted of 13 episodes, each running approximately 47 minutes in length. AMC broadcast the second season on Sundays at 10:00 pm in the United States. The complete second season was released on Region 1 DVD and Region A Blu-ray on March 16, 2010.', $this->season->getOverview());
$this->assertEquals(3573, $this->season->getId());
$this->assertEquals('/rCdISteF1GPvPsy0a5L0LDffjtP.jpg', $this->season->getPosterPath());
$this->assertEquals(2, $this->season->getSeasonNumber());
}

protected function getFactoryClass()
{
return 'Tmdb\Factory\TvSeasonFactory';
Expand Down
14 changes: 14 additions & 0 deletions test/Tmdb/Tests/Model/Tv/SeasonTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,18 @@ public function shouldConstructTvSeason()
)
);
}

/**
* @test
*/
public function shouldBeAbleToOverrideDefaultCollections()
{
$season = new Season();

$class = new \stdClass();

$season->setCredits($class);

$this->assertInstanceOf('stdClass', $season->getCredits());
}
}

0 comments on commit 9c630c9

Please sign in to comment.