Skip to content

Commit

Permalink
Updating unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
wtfzdotnet committed Feb 2, 2014
1 parent dc8f050 commit ba0bb96
Showing 1 changed file with 18 additions and 4 deletions.
22 changes: 18 additions & 4 deletions test/Tmdb/Tests/Factory/MovieFactoryTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,25 +13,34 @@
namespace Tmdb\Tests\Factory;

use Tmdb\Factory\MovieFactory;
use Tmdb\Model\Movie;

class MovieFactoryTest extends TestCase
{
const MOVIE_ID = 120;

/**
* @test
* @var Movie
*/
public function shouldConstructMovie()
private $movie;

public function setUp()
{
/**
* @var MovieFactory $factory
*/
$factory = $this->getFactory();
$data = $this->loadByFile('movie/all.json');

$movie = $factory->create($data);
$this->movie = $factory->create($data);
}

$this->assertInstanceOf('Tmdb\Model\Movie', $movie);
/**
* @test
*/
public function shouldConstructMovie()
{
$this->assertInstanceOf('Tmdb\Model\Movie', $this->movie);
}

/**
Expand All @@ -54,6 +63,11 @@ public function shouldBeAbleToSetFactories()
$this->assertInstanceOf('stdClass', $factory->getImageFactory());
}

public function shouldBeFunctional()
{
$this->assertEquals(false, $this->movie->getAdult());
}

protected function getFactoryClass()
{
return 'Tmdb\Factory\MovieFactory';
Expand Down

0 comments on commit ba0bb96

Please sign in to comment.