From 04dc3503010a785e1c9f7af0ae573dca96b7f0d0 Mon Sep 17 00:00:00 2001 From: Michael Roterman Date: Wed, 29 Jan 2014 18:40:09 +0100 Subject: [PATCH] Adding MovieFactoryTest, and fixing the base TestCase to always return assoc arrays. --- .../Tmdb/Tests/Factory/CompanyFactoryTest.php | 2 +- test/Tmdb/Tests/Factory/GenreFactoryTest.php | 2 +- test/Tmdb/Tests/Factory/MovieFactoryTest.php | 61 +++++++++++++++++++ test/Tmdb/Tests/Resources/movie/all.json | 1 + test/Tmdb/Tests/TestCase.php | 3 +- 5 files changed, 66 insertions(+), 3 deletions(-) create mode 100644 test/Tmdb/Tests/Factory/MovieFactoryTest.php create mode 100644 test/Tmdb/Tests/Resources/movie/all.json diff --git a/test/Tmdb/Tests/Factory/CompanyFactoryTest.php b/test/Tmdb/Tests/Factory/CompanyFactoryTest.php index 462c9a8d..1aaccb67 100644 --- a/test/Tmdb/Tests/Factory/CompanyFactoryTest.php +++ b/test/Tmdb/Tests/Factory/CompanyFactoryTest.php @@ -22,7 +22,7 @@ class CompanyFactoryTest extends TestCase public function shouldConstructCompany() { $factory = $this->getFactory(); - $data = (array) $this->loadByFile('company/get.json'); + $data = $this->loadByFile('company/get.json'); $company = $factory->create($data); diff --git a/test/Tmdb/Tests/Factory/GenreFactoryTest.php b/test/Tmdb/Tests/Factory/GenreFactoryTest.php index 6234e438..b07cab8f 100644 --- a/test/Tmdb/Tests/Factory/GenreFactoryTest.php +++ b/test/Tmdb/Tests/Factory/GenreFactoryTest.php @@ -22,7 +22,7 @@ class GenreFactoryTest extends TestCase public function shouldConstructGenres() { $factory = $this->getFactory(); - $data = (array) $this->loadByFile('genre/result.json'); + $data = $this->loadByFile('genre/result.json'); $collection = $factory->createCollection($data['genres']); diff --git a/test/Tmdb/Tests/Factory/MovieFactoryTest.php b/test/Tmdb/Tests/Factory/MovieFactoryTest.php new file mode 100644 index 00000000..fae7a0a2 --- /dev/null +++ b/test/Tmdb/Tests/Factory/MovieFactoryTest.php @@ -0,0 +1,61 @@ + + * @copyright (c) 2013, Michael Roterman + * @version 0.0.1 + */ +namespace Tmdb\Tests\Factory; + +use Tmdb\Factory\MovieFactory; + +class MovieFactoryTest extends TestCase +{ + const MOVIE_ID = 120; + + /** + * @test + */ + public function shouldConstructMovie() + { + /** + * @var MovieFactory $factory + */ + $factory = $this->getFactory(); + $data = $this->loadByFile('movie/all.json'); + + $movie = $factory->create($data); + + $this->assertInstanceOf('Tmdb\Model\Movie', $movie); + } + + /** + * @test + */ + public function shouldBeAbleToSetFactories() + { + $factory = new MovieFactory(); + + $class = new \stdClass(); + + $factory->setCastFactory($class); + $factory->setCrewFactory($class); + $factory->setGenreFactory($class); + $factory->setImageFactory($class); + + $this->assertInstanceOf('stdClass', $factory->getCastFactory()); + $this->assertInstanceOf('stdClass', $factory->getCrewFactory()); + $this->assertInstanceOf('stdClass', $factory->getGenreFactory()); + $this->assertInstanceOf('stdClass', $factory->getImageFactory()); + } + + protected function getFactoryClass() + { + return 'Tmdb\Factory\MovieFactory'; + } +} \ No newline at end of file diff --git a/test/Tmdb/Tests/Resources/movie/all.json b/test/Tmdb/Tests/Resources/movie/all.json new file mode 100644 index 00000000..b51d5d88 --- /dev/null +++ b/test/Tmdb/Tests/Resources/movie/all.json @@ -0,0 +1 @@ +{"adult":false,"backdrop_path":"\/7DlIoyQ3ecGMklVWyKsneZmVnsi.jpg","belongs_to_collection":{"id":2794,"name":"The Chronicles of Riddick Collection","poster_path":"\/4R2zrqk9KzgxU9UDH3yUUsENXR.jpg","backdrop_path":"\/xb5zyHecWA7UACdiNPXDA3m5HSY.jpg"},"budget":38000000,"genres":[{"id":28,"name":"Action"},{"id":878,"name":"Science Fiction"},{"id":53,"name":"Thriller"}],"homepage":"http:\/\/www.riddick-movie.com","id":87421,"imdb_id":"tt1411250","original_title":"Riddick","overview":"Betrayed by his own kind and left for dead on a desolate planet, Riddick fights for survival against alien predators and becomes more powerful and dangerous than ever before. Soon bounty hunters from throughout the galaxy descend on Riddick only to find themselves pawns in his greater scheme for revenge. With his enemies right where he wants them, Riddick unleashes a vicious attack of vengeance before returning to his home planet of Furya to save it from destruction.","popularity":"93.4917224393659","poster_path":"\/1NfhdnQAEqcBRCulEhOFSkRrrLv.jpg","production_companies":[{"name":"Universal Pictures","id":33},{"name":"One Race Productions","id":1225},{"name":"Radar Pictures","id":14718}],"production_countries":[{"iso_3166_1":"US","name":"United States of America"}],"release_date":"2013-09-06","revenue":42025135,"runtime":119,"spoken_languages":[{"iso_639_1":"en","name":"English"}],"status":"Released","tagline":"Survival Is His Revenge","title":"Riddick","vote_average":6.2,"vote_count":625,"alternative_titles":{"titles":[{"iso_3166_1":"US","title":"Riddick"},{"iso_3166_1":"CN","title":"\u661f\u9645\u4f20\u59473"},{"iso_3166_1":"US","title":"The Chronicles of Riddick: Dead Man Stalking"},{"iso_3166_1":"FR","title":"Riddick: Domptez les t\u00e9n\u00e8bres"},{"iso_3166_1":"BR","title":"Riddick 3"},{"iso_3166_1":"DE","title":"Riddick Ueberleben ist seine Rache"},{"iso_3166_1":"CA","title":"Chronicles of Riddick 3 - Riddick"},{"iso_3166_1":"CA","title":"Riddick 4"},{"iso_3166_1":"CA","title":"Chronicles of Riddick 4 - Riddick"},{"iso_3166_1":"DE","title":"Riddick 2013"},{"iso_3166_1":"KR","title":"\ub9ac\ub515"},{"iso_3166_1":"ES","title":"Riddick (2013)"},{"iso_3166_1":"GR","title":"Riddick (2013)"},{"iso_3166_1":"TH","title":"\u0e23\u0e34\u0e14\u0e14\u0e34\u0e01 3"}]},"changes":{"changes":[]},"credits":{"cast":[{"id":12835,"name":"Vin Diesel","character":"Riddick","order":0,"cast_id":1,"profile_path":"\/qwyfzMKIhxJ7ols66FgEf7eGdcI.jpg"},{"id":1372,"name":"Karl Urban","character":"Lord Vaako","order":1,"cast_id":2,"profile_path":"\/tHYOUO33K7iaDw8nXyqRvDIkVuM.jpg"},{"id":51798,"name":"Katee Sackhoff","character":"Dahl","order":2,"cast_id":3,"profile_path":"\/8NcZJxNRSxP2QegcWeX8WDnFlSs.jpg"},{"id":31384,"name":"Jordi Moll\u00e0","character":"Santana","order":3,"cast_id":4,"profile_path":"\/A648UpxxLlgdqziafgSCAVaR0Sc.jpg"},{"id":71913,"name":"Bokeem Woodbine","character":"Moss","order":4,"cast_id":5,"profile_path":"\/5jxJLgIsEsKwsHSLVjNvMZzs1Mm.jpg"},{"id":82819,"name":"Nolan Gerard Funk","character":"Luna","order":5,"cast_id":7,"profile_path":"\/an3qC0DTKiyzLs76Xw9t9crQfN5.jpg"},{"id":172915,"name":"Noah Danby","character":"Nunez","order":6,"cast_id":15,"profile_path":"\/l6soX1Mb6V2QWwxrMjTVEaaaPB2.jpg"},{"id":105496,"name":"Neil Napier","character":"Rubio","order":7,"cast_id":16,"profile_path":"\/g2X7h1YSAgTixZD3XlOzOdLUHMw.jpg"},{"id":1151352,"name":"Keri Hilson","character":"","order":8,"cast_id":17,"profile_path":"\/bmrHsGOx35pcYKXjn1aEL7sb5Rd.jpg"},{"id":543530,"name":"Dave Bautista","character":"Diaz","order":9,"cast_id":18,"profile_path":"\/gtb1sMCmZjAeF0lSdEWLjFsSvmr.jpg"},{"id":123879,"name":"Matthew Nable","character":"Boss Johns","order":10,"cast_id":19,"profile_path":"\/yE5MHKIUreuzL5bEgh8NTN8bSYe.jpg"}],"crew":[{"id":28239,"name":"David Twohy","department":"Writing","job":"Writer","profile_path":"\/7hJbNy5XKO5je9FsSGvl4QbGyMM.jpg"},{"id":9196,"name":"Ted Field","department":"Production","job":"Producer","profile_path":null},{"id":12835,"name":"Vin Diesel","department":"Production","job":"Producer","profile_path":"\/qwyfzMKIhxJ7ols66FgEf7eGdcI.jpg"},{"id":90635,"name":"Samantha Vincent","department":"Production","job":"Producer","profile_path":null},{"id":114409,"name":"Mike Drake","department":"Production","job":"Executive Producer","profile_path":null},{"id":90635,"name":"Samantha Vincent","department":"Production","job":"Executive Producer","profile_path":null},{"id":60791,"name":"George Zakk","department":"Production","job":"Executive Producer","profile_path":null},{"id":5912,"name":"Graeme Revell","department":"Sound","job":"Original Music Composer","profile_path":"\/g2Nhv2OCV8ygLYxkeDbhlqnrv7Z.jpg"},{"id":28240,"name":"David Eggby","department":"Camera","job":"Director of Photography","profile_path":null},{"id":72107,"name":"Tracy Adams","department":"Editing","job":"Editor","profile_path":null},{"id":9990,"name":"Joseph C. Nemec III","department":"Art","job":"Production Design","profile_path":null},{"id":9545,"name":"Anne McCarthy","department":"Production","job":"Casting","profile_path":null},{"id":1198826,"name":"Simonetta Mariano","department":"Costume & Make-Up","job":"Costume Design","profile_path":null},{"id":28239,"name":"David Twohy","department":"Directing","job":"Director","profile_path":"\/7hJbNy5XKO5je9FsSGvl4QbGyMM.jpg"}]},"images":{"backdrops":[{"aspect_ratio":1.78,"file_path":"\/7DlIoyQ3ecGMklVWyKsneZmVnsi.jpg","height":1080,"iso_639_1":"xx","vote_average":"5.37414965986395","vote_count":7,"width":1920},{"aspect_ratio":1.78,"file_path":"\/o4L5wfptChTMOmaNDFRpTWAyrxF.jpg","height":1080,"iso_639_1":"xx","vote_average":5.2864044168392,"vote_count":6,"width":1920},{"aspect_ratio":1.78,"file_path":"\/47aodUjJ35ybrwCd1AdbpHWxjoh.jpg","height":1080,"iso_639_1":"xx","vote_average":"5.28273809523809","vote_count":1,"width":1920},{"aspect_ratio":1.78,"file_path":"\/6sHYGSPZb6d7Ex7WSgl528Hzaez.jpg","height":720,"iso_639_1":"xx","vote_average":"5.26739926739927","vote_count":2,"width":1280},{"aspect_ratio":1.78,"file_path":"\/AasqjiA81zQJlpHVP5K2TmQi3HO.jpg","height":1080,"iso_639_1":"xx","vote_average":"5.23809523809524","vote_count":1,"width":1920},{"aspect_ratio":1.78,"file_path":"\/mlwllFqzhQf86HZzv8J8xEGy0Gt.jpg","height":1080,"iso_639_1":null,"vote_average":"5.17113095238095","vote_count":1,"width":1920},{"aspect_ratio":1.78,"file_path":"\/lM0mFbYn4jMqRpjccyTQvlRZemb.jpg","height":1080,"iso_639_1":null,"vote_average":"5.17113095238095","vote_count":1,"width":1920},{"aspect_ratio":1.78,"file_path":"\/cWoEcrfaEXIGf8NKZPm861Fxlmc.jpg","height":1080,"iso_639_1":null,"vote_average":"5.17113095238095","vote_count":1,"width":1920},{"aspect_ratio":1.78,"file_path":"\/nJcEp4E3f2Kc9fkJRI1A922PT1u.jpg","height":720,"iso_639_1":null,"vote_average":"5.17113095238095","vote_count":1,"width":1280},{"aspect_ratio":1.78,"file_path":"\/v45JoTbH8NGcdce2Q9mus1fV8wD.jpg","height":1080,"iso_639_1":null,"vote_average":"5.17113095238095","vote_count":1,"width":1920},{"aspect_ratio":1.78,"file_path":"\/utERhydS3s0c7yxE2ZZGGccpTqX.jpg","height":720,"iso_639_1":null,"vote_average":"5.14285714285714","vote_count":2,"width":1280},{"aspect_ratio":1.78,"file_path":"\/y2phgiP9OcPL86cgGczSPnung1a.jpg","height":1080,"iso_639_1":null,"vote_average":0,"vote_count":0,"width":1920},{"aspect_ratio":1.78,"file_path":"\/7EDc86sqEsJocUbJy4coF7MMjZQ.jpg","height":1080,"iso_639_1":null,"vote_average":0,"vote_count":0,"width":1920},{"aspect_ratio":1.78,"file_path":"\/3UyrWZHMHYz0gjtvfEwtTdvwbuu.jpg","height":720,"iso_639_1":null,"vote_average":0,"vote_count":0,"width":1280},{"aspect_ratio":1.78,"file_path":"\/2M3uwFqbrZhj1d27f0nSBY1MRNO.jpg","height":720,"iso_639_1":null,"vote_average":0,"vote_count":0,"width":1280},{"aspect_ratio":1.78,"file_path":"\/z9KpzXsyurWHwDogOgkIrxBPZw9.jpg","height":720,"iso_639_1":null,"vote_average":0,"vote_count":0,"width":1280},{"aspect_ratio":1.78,"file_path":"\/oW1R59kIAIJV7zuGFfoJjA4EUuS.jpg","height":1080,"iso_639_1":null,"vote_average":0,"vote_count":0,"width":1920},{"aspect_ratio":1.78,"file_path":"\/4GHsQhTiCK9V7pBGCMTgvncpALh.jpg","height":720,"iso_639_1":null,"vote_average":0,"vote_count":0,"width":1280},{"aspect_ratio":1.78,"file_path":"\/mUQz7fJupYfbaiL2kppuH15fsW6.jpg","height":1080,"iso_639_1":null,"vote_average":0,"vote_count":0,"width":1920},{"aspect_ratio":1.78,"file_path":"\/bMMhbyEUudWOLOcgHORZ57LArRL.jpg","height":1080,"iso_639_1":null,"vote_average":0,"vote_count":0,"width":1920}],"posters":[{"aspect_ratio":0.67,"file_path":"\/1NfhdnQAEqcBRCulEhOFSkRrrLv.jpg","height":1500,"iso_639_1":"en","vote_average":"5.34461152882206","vote_count":13,"width":1000},{"aspect_ratio":0.67,"file_path":"\/l2m8WpT4TeSp6c6k0G3t6DeXCVB.jpg","height":1500,"iso_639_1":"pt","vote_average":5.3125,"vote_count":1,"width":1000},{"aspect_ratio":0.71,"file_path":"\/11U7L7DH8hPNXrMwMM6u80MuMyF.jpg","height":1000,"iso_639_1":"bg","vote_average":5.3125,"vote_count":1,"width":706},{"aspect_ratio":0.67,"file_path":"\/hh5w3pKXR2hDJvi8fsQxJWJd8gX.jpg","height":2100,"iso_639_1":"de","vote_average":5.3125,"vote_count":1,"width":1400},{"aspect_ratio":0.67,"file_path":"\/dW3ZXUAmpaNArZfyDJ6AXBXRf4q.jpg","height":1500,"iso_639_1":"fr","vote_average":5.3125,"vote_count":1,"width":1000},{"aspect_ratio":0.73,"file_path":"\/pdx1E4CfMtnqzkwmEpv0kfy2UAO.jpg","height":1500,"iso_639_1":"fr","vote_average":5.3125,"vote_count":1,"width":1089},{"aspect_ratio":0.67,"file_path":"\/bXq8pBl2SQ4QnBj2I929WKoOer.jpg","height":1500,"iso_639_1":"fr","vote_average":5.3125,"vote_count":1,"width":1000},{"aspect_ratio":0.67,"file_path":"\/8uhg2B5DCrvlpXGw2sMFjFEkdCO.jpg","height":1500,"iso_639_1":"hu","vote_average":5.3125,"vote_count":1,"width":1000},{"aspect_ratio":0.67,"file_path":"\/xkQ5yWnMjpC2bGmu7GsD66AAoKO.jpg","height":1500,"iso_639_1":"vo","vote_average":"5.27568922305765","vote_count":13,"width":1000},{"aspect_ratio":0.7,"file_path":"\/8focR4K12hYbDSOKUEDl7bmzvO4.jpg","height":2835,"iso_639_1":"ro","vote_average":"5.27529761904762","vote_count":1,"width":1985},{"aspect_ratio":0.67,"file_path":"\/duoN6oNGp1emHkkhlTcY76Wz2ED.jpg","height":1500,"iso_639_1":"en","vote_average":"5.26455026455026","vote_count":9,"width":1000},{"aspect_ratio":0.75,"file_path":"\/15DG4xfGy34fznSbSpq9BA9D3Di.jpg","height":3780,"iso_639_1":"fr","vote_average":"5.25974025974026","vote_count":3,"width":2835},{"aspect_ratio":0.68,"file_path":"\/zF5UCwpRePO04Axl48UXt4LWlQP.jpg","height":1600,"iso_639_1":"es","vote_average":"5.23809523809524","vote_count":1,"width":1088},{"aspect_ratio":0.67,"file_path":"\/loRoAKEVmpqeVk4lpeEqHT0gSYD.jpg","height":1500,"iso_639_1":"en","vote_average":"5.19727891156463","vote_count":7,"width":1000},{"aspect_ratio":0.67,"file_path":"\/siRF1AoO4BnnobNCy3ZgyWWQDVN.jpg","height":1500,"iso_639_1":"en","vote_average":5.1890756302521,"vote_count":5,"width":1000},{"aspect_ratio":0.67,"file_path":"\/m24mV2MqwqxJibJ751VWa8tVmzK.jpg","height":2100,"iso_639_1":"de","vote_average":"5.16369047619048","vote_count":1,"width":1400},{"aspect_ratio":0.75,"file_path":"\/vxK0U62pmt7keXKJlzPcocReteH.jpg","height":786,"iso_639_1":"fr","vote_average":"5.11355311355311","vote_count":2,"width":590},{"aspect_ratio":0.67,"file_path":"\/hVaU9sxdzRWroXIX81jRAtGGz4T.jpg","height":1500,"iso_639_1":"en","vote_average":"5.10622710622711","vote_count":2,"width":1000},{"aspect_ratio":0.7,"file_path":"\/ohfpu2ErKqcfUvMAGRZhPG8bPfI.jpg","height":1600,"iso_639_1":"en","vote_average":"5.09009009009009","vote_count":11,"width":1120},{"aspect_ratio":0.67,"file_path":"\/o0ZtQ7G2b3qVaqY0CKYRXBUulQd.jpg","height":1500,"iso_639_1":"en","vote_average":"5.07703081232493","vote_count":5,"width":1012},{"aspect_ratio":0.67,"file_path":"\/pfamu0LfFnFBJTVtmKN9zqeRINY.jpg","height":1500,"iso_639_1":"en","vote_average":"5.06802721088435","vote_count":7,"width":1000},{"aspect_ratio":0.67,"file_path":"\/pBaKVXmCQQhZittkhTYQW9WYr2s.jpg","height":1500,"iso_639_1":"en","vote_average":"5.06613756613757","vote_count":9,"width":1000},{"aspect_ratio":0.67,"file_path":"\/8BCMDqa8ojm3eruv6WK1AhVZIRR.jpg","height":1500,"iso_639_1":"en","vote_average":"5.05602240896359","vote_count":5,"width":1000},{"aspect_ratio":0.67,"file_path":"\/mwuPRiZUvDl9tlOY2LsdjZbyzDX.jpg","height":750,"iso_639_1":"en","vote_average":"4.98223169864961","vote_count":4,"width":500},{"aspect_ratio":0.67,"file_path":"\/4g6IYwyRqJr2vie6eGP5emIsQw5.jpg","height":1000,"iso_639_1":"en","vote_average":"4.83673469387755","vote_count":7,"width":667},{"aspect_ratio":0.7,"file_path":"\/4Gd6ci5bUVZHxLzvnFfGOAtAeVg.jpg","height":1139,"iso_639_1":"ru","vote_average":0,"vote_count":0,"width":800},{"aspect_ratio":0.7,"file_path":"\/5J5JIAYpeqGrndWEvwYiTYwMKIz.jpg","height":1138,"iso_639_1":"ru","vote_average":0,"vote_count":0,"width":800},{"aspect_ratio":0.7,"file_path":"\/5mOrLnLC8K6xbIivAxr8Pi6YLUi.jpg","height":750,"iso_639_1":"th","vote_average":0,"vote_count":0,"width":524},{"aspect_ratio":0.7,"file_path":"\/kNyXor3SvOyHwBisgsLhYHi6t7K.jpg","height":1004,"iso_639_1":"hu","vote_average":0,"vote_count":0,"width":700},{"aspect_ratio":0.75,"file_path":"\/uAqbzU2JroOsKpSCi5Hke1cylmL.jpg","height":960,"iso_639_1":"es","vote_average":0,"vote_count":0,"width":720},{"aspect_ratio":0.69,"file_path":"\/5vxVhmJR7SIzNzVl2xBVsF1BQ3R.jpg","height":800,"iso_639_1":"el","vote_average":0,"vote_count":0,"width":555},{"aspect_ratio":0.68,"file_path":"\/e3h90HuZgIJLctWRL0XQ8KuTeLP.jpg","height":1388,"iso_639_1":"pt","vote_average":0,"vote_count":0,"width":945},{"aspect_ratio":0.71,"file_path":"\/9i9t4JyvdmUGYSblYaVMa0FkRDm.jpg","height":1056,"iso_639_1":"pt","vote_average":0,"vote_count":0,"width":750},{"aspect_ratio":0.67,"file_path":"\/ivWaU6iuONCStcAbNHPeARxvMhw.jpg","height":1500,"iso_639_1":"de","vote_average":0,"vote_count":0,"width":1000}]},"keywords":{"keywords":[{"id":13194,"name":"planet"},{"id":9951,"name":"aliens"},{"id":189830,"name":"revenge"},{"id":197117,"name":"riddick"}]},"lists":{"page":1,"results":[{"description":"Must watch Sci-Fi films for 2013, in no particular order.","favorite_count":45,"id":"50cbe90b19c2956de8047b4f","item_count":10,"iso_639_1":"en","name":"Sci-Fi films to see in 2013","poster_path":"\/pmyZRPocfjmXaGBddtz8EmlfrRX.jpg"},{"description":"Sorted by release date. List created by Movie Roll App.","favorite_count":6,"id":"51fb46ed19c2954cae184697","item_count":38,"iso_639_1":"en","name":"Most Anticipated Movies of 2013","poster_path":"\/fQkTTUtbzBqtxVyOpua9wv4A8id.jpg"},{"description":"All movies with a US theatrical release in 2013. Possible Oscar season contenders.","favorite_count":4,"id":"51e6eb7b760ee34f2219b061","item_count":230,"iso_639_1":"en","name":"2013 Releases","poster_path":"\/v537Jp4TBFFnT7WvhvAJ1pevWFL.jpg"},{"description":"","favorite_count":2,"id":"5112931119c29531fd21e05c","item_count":17,"iso_639_1":"en","name":"Films to see in 2013","poster_path":"\/7vkoFZVtg5focxMXwJvJr21eStZ.jpg"},{"description":"","favorite_count":1,"id":"51229e8219c29541b102cf9e","item_count":5,"iso_639_1":"en","name":"Watch List","poster_path":null},{"description":"","favorite_count":1,"id":"516c94b8760ee32edda3b363","item_count":51,"iso_639_1":"en","name":"To Watch","poster_path":"\/AqaAkN8hDYHFTIpTp6tOq3VkJhn.jpg"},{"description":"List maintained by Movie Collection, the iOS app.","favorite_count":1,"id":"51a9c85ee24fab13ddc66624","item_count":37,"iso_639_1":"en","name":"Movie Collection","poster_path":"\/6LUQSV6VEbvKBne4fNJadTrsMgl.jpg"},{"description":"Created by SeenNotSeen.io. A list of all movies that I have seen.","favorite_count":1,"id":"51aa12ae3bd4c0016ad39ab8","item_count":676,"iso_639_1":"en","name":"Seen - SeenNotSeen.io","poster_path":"\/6hoGv2vvP3TVdQPUJmp2ieKw3q8.jpg"},{"description":"","favorite_count":1,"id":"51c1ebe719c29503130f2ac0","item_count":51,"iso_639_1":"en","name":"2013","poster_path":"\/tWOm7jGJeWsHIAYUY3hOaaIWJWq.jpg"},{"description":"","favorite_count":1,"id":"52e0e4b319c29575860cc258","item_count":1,"iso_639_1":"en","name":"Seen movies","poster_path":null},{"description":"DVD Collection","favorite_count":1,"id":"51c17e8fe24fab67e3933ac4","item_count":465,"iso_639_1":"en","name":"My Movies","poster_path":"\/81dmnc135Dgpymy4lTwkAFGaVB5.jpg"},{"description":"My personal Watchlist...","favorite_count":1,"id":"51d1fde5760ee35df10fec5d","item_count":27,"iso_639_1":"en","name":"Watchlist","poster_path":"\/57ALcFilEffM4yO6tG7SkWS8Ccw.jpg"},{"description":"List maintained by Movie Collection, the iOS app.","favorite_count":1,"id":"516fd469d1c6b9267fdc376d","item_count":252,"iso_639_1":"en","name":"Movie Collection","poster_path":"\/hUzmBRndOSwiVrxYev7H30jP632.jpg"},{"description":"","favorite_count":1,"id":"5261c7465291572d2676cac1","item_count":10,"iso_639_1":"en","name":"Obejrzane","poster_path":null},{"description":"movies","favorite_count":1,"id":"51c7fc5ee24fab67b365fd3b","item_count":109,"iso_639_1":"en","name":"movies","poster_path":"\/5XgM3zSQ2xkkaNXphKh5fxAHh7O.jpg"},{"description":"torrent","favorite_count":1,"id":"52002d305291577b8b8b4589","item_count":6,"iso_639_1":"en","name":"BAIXAR","poster_path":"\/qr9qf4PQ6fwCEDonfFF3nVysMXH.jpg"},{"description":"Film a voir","favorite_count":1,"id":"521abe269a121832d208446a","item_count":9,"iso_639_1":"en","name":"Film a voir","poster_path":"\/jsFNQboF2hBkZPjOxO12ckfRWOC.jpg"},{"description":"Watched Movies","favorite_count":1,"id":"522ac28a3bd4c07589c02138","item_count":2,"iso_639_1":"en","name":"Watched List","poster_path":null},{"description":"List maintained by Movie Collection, the iOS app.","favorite_count":1,"id":"51f5236de24fab0e566ff6c8","item_count":226,"iso_639_1":"en","name":"Movie Collection","poster_path":"\/z79jNrA563F5rTGzDcbspUcshYe.jpg"},{"description":"","favorite_count":1,"id":"52507d0a19c2953e42046835","item_count":306,"iso_639_1":"en","name":"My Movie Collection","poster_path":"\/d2ARAEewKmb1poQx2V3mahAdxYl.jpg"}],"total_pages":3,"total_results":54},"releases":{"countries":[{"iso_3166_1":"US","certification":"R","release_date":"2013-09-06"},{"iso_3166_1":"DE","certification":"16","release_date":"2013-09-19"},{"iso_3166_1":"BR","certification":"16 anos","release_date":"2013-09-06"},{"iso_3166_1":"DK","certification":"","release_date":"2013-09-05"},{"iso_3166_1":"AR","certification":"","release_date":"2013-09-12"},{"iso_3166_1":"AU","certification":"","release_date":"2013-09-12"},{"iso_3166_1":"RU","certification":"","release_date":"2013-09-12"},{"iso_3166_1":"IT","certification":"","release_date":"2013-10-17"},{"iso_3166_1":"BE","certification":"","release_date":"2013-11-20"},{"iso_3166_1":"NL","certification":"","release_date":"2013-09-05"},{"iso_3166_1":"AT","certification":"","release_date":"2013-09-05"},{"iso_3166_1":"KZ","certification":"","release_date":"2013-09-11"},{"iso_3166_1":"BG","certification":"D","release_date":"2013-09-06"},{"iso_3166_1":"GB","certification":"15","release_date":"2013-09-03"},{"iso_3166_1":"IE","certification":"","release_date":"2013-09-04"},{"iso_3166_1":"FR","certification":"12","release_date":"2013-09-18"},{"iso_3166_1":"SK","certification":"15","release_date":"2013-09-05"},{"iso_3166_1":"ES","certification":"16","release_date":"2013-09-02"},{"iso_3166_1":"HK","certification":"","release_date":"2013-09-05"},{"iso_3166_1":"HR","certification":"","release_date":"2013-09-05"},{"iso_3166_1":"HU","certification":"","release_date":"2013-09-05"},{"iso_3166_1":"ID","certification":"","release_date":"2013-09-05"},{"iso_3166_1":"IL","certification":"","release_date":"2013-09-05"},{"iso_3166_1":"KW","certification":"","release_date":"2013-09-05"},{"iso_3166_1":"CA","certification":"","release_date":"2013-09-06"},{"iso_3166_1":"EE","certification":"","release_date":"2013-09-06"},{"iso_3166_1":"FI","certification":"","release_date":"2013-09-06"},{"iso_3166_1":"IN","certification":"","release_date":"2013-09-06"},{"iso_3166_1":"LT","certification":"","release_date":"2013-09-06"},{"iso_3166_1":"NO","certification":"","release_date":"2013-09-06"},{"iso_3166_1":"PL","certification":"","release_date":"2013-09-06"},{"iso_3166_1":"TW","certification":"","release_date":"2013-09-06"},{"iso_3166_1":"KH","certification":"","release_date":"2013-09-12"},{"iso_3166_1":"SG","certification":"","release_date":"2013-09-12"},{"iso_3166_1":"PK","certification":"","release_date":"2013-09-13"},{"iso_3166_1":"PH","certification":"","release_date":"2013-09-18"},{"iso_3166_1":"PT","certification":"","release_date":"2013-09-19"},{"iso_3166_1":"IS","certification":"","release_date":"2013-09-20"},{"iso_3166_1":"SE","certification":"","release_date":"2013-09-20"},{"iso_3166_1":"TR","certification":"","release_date":"2013-10-04"},{"iso_3166_1":"GR","certification":"","release_date":"2013-10-17"},{"iso_3166_1":"PE","certification":"","release_date":"2013-10-24"},{"iso_3166_1":"MX","certification":"","release_date":"2013-10-25"},{"iso_3166_1":"CL","certification":"","release_date":"2014-01-30"},{"iso_3166_1":"JP","certification":"","release_date":"2014-03-08"},{"iso_3166_1":"KR","certification":"15\uc138 \uad00\ub78c\uac00","release_date":"2013-11-26"}]},"similar_movies":{"page":1,"results":[{"adult":false,"backdrop_path":"\/gbM4nG9f0PuX5OcveN2AUbSnsdZ.jpg","id":16067,"original_title":"Final Days of Planet Earth","release_date":"2006-03-15","poster_path":"\/gHJeOcllD6NWPf81kct3Ta6563L.jpg","popularity":0.66194,"title":"Final Days of Planet Earth","vote_average":4.5,"vote_count":1},{"adult":false,"backdrop_path":"\/sLn5HvFwLIL7Fof2Jj0JEeJSrGC.jpg","id":34851,"original_title":"Predators","release_date":"2010-07-06","poster_path":"\/dnc8D22PKNEiLS4LmEuEHjrTvVk.jpg","popularity":"11.5934942667441","title":"Predators","vote_average":5.9,"vote_count":200},{"adult":false,"backdrop_path":"\/xvRrnaoacokt23L1BhDGFMO3g6I.jpg","id":14458,"original_title":"Altered","release_date":"2006-01-01","poster_path":"\/8hRJKLSGrJfT8VBYxgD08VijTva.jpg","popularity":0.23,"title":"Altered","vote_average":6.2,"vote_count":7},{"adult":false,"backdrop_path":"\/eMSOa15zPUIkT05v4mhhCtGhEfB.jpg","id":25977,"original_title":"Showdown at Area 51","release_date":"2007-01-01","poster_path":"\/yKOtJCCNQiiJbmXhzp8G4bPDl9o.jpg","popularity":0.644,"title":"Showdown at Area 51","vote_average":0,"vote_count":0},{"adult":false,"backdrop_path":"\/2VsGJ2h7Kp8rebTrYFUIlYil7Mw.jpg","id":27042,"original_title":"The ChubbChubbs!","release_date":"2002-07-03","poster_path":"\/jRQ71cxYN2VfOApf2VS96vFPJI0.png","popularity":0.34868,"title":"The ChubbChubbs!","vote_average":8,"vote_count":1},{"adult":false,"backdrop_path":"\/rQOvmcqE9xJCkfA4Sy8TPiA11XI.jpg","id":38020,"original_title":"Planet of Dinosaurs","release_date":"1977-11-18","poster_path":"\/w107PQzMYrjaiaLwDmfFWrFd2WB.jpg","popularity":0.54165,"title":"Planet of Dinosaurs","vote_average":6,"vote_count":1},{"adult":false,"backdrop_path":"\/8vXh5Q3xChDKTjaL3fhcvxoQRxZ.jpg","id":45887,"original_title":"Alive in Joburg","release_date":"2005-01-01","poster_path":"\/rMHTm7v8UsXsre9sKTSz0aPjj4o.jpg","popularity":0.46,"title":"Alive in Joburg","vote_average":4.8,"vote_count":4},{"adult":false,"backdrop_path":"\/hbQQG1nshQerHfHAz13JPB9WBLE.jpg","id":63087,"original_title":"The Slime People","release_date":"1963-03-29","poster_path":"\/eGOER3SRKLSfZz53PPKo4SHtRui.jpg","popularity":0.23,"title":"The Slime People","vote_average":0,"vote_count":0},{"adult":false,"backdrop_path":"\/myfDpFeMDUT5bsVqFc13HgBCVwR.jpg","id":63088,"original_title":"The Eye Creatures","release_date":"1965-10-29","poster_path":"\/4Ao6eLiKn9aUneHLw4bVxQ6s862.jpg","popularity":0.23,"title":"The Eye Creatures","vote_average":1,"vote_count":2},{"adult":false,"backdrop_path":null,"id":86633,"original_title":"The Alien Factor","release_date":"1978-05-12","poster_path":"\/E8Wvspbubh5chGWQwO20T4OSQi.jpg","popularity":0.23,"title":"The Alien Factor","vote_average":3.5,"vote_count":2},{"adult":false,"backdrop_path":null,"id":200665,"original_title":"Invasion for Flesh and Blood","release_date":"","poster_path":"\/1VENfL5n7D9YesA4OQTn1yJiXRm.jpg","popularity":0.69,"title":"Invasion for Flesh and Blood","vote_average":0,"vote_count":0},{"adult":false,"backdrop_path":null,"id":209443,"original_title":"The Aliens are Coming","release_date":"1980-03-02","poster_path":"\/38u8DEHaBvCnsqmnbBmd7HTBgO2.jpg","popularity":0.46,"title":"The Aliens are Coming","vote_average":0,"vote_count":0},{"adult":false,"backdrop_path":null,"id":218650,"original_title":"Invasion of the Space Preachers","release_date":"1990-01-01","poster_path":"\/juDmJYLtXdOfx32SNXJWSGzuS2D.jpg","popularity":0.23,"title":"Invasion of the Space Preachers","vote_average":0,"vote_count":0},{"adult":false,"backdrop_path":"\/zV3IilWLmh9pG0EahoXDNALqJ1c.jpg","id":125691,"original_title":"Invasions","release_date":"2009-01-01","poster_path":"\/7EwtQ96rITOlKjDLUK7EufkymfA.jpg","popularity":0.23,"title":"Invasions","vote_average":0,"vote_count":0},{"adult":false,"backdrop_path":"\/xiswGFKyXmG2mHijPkuI6GyEOGm.jpg","id":115199,"original_title":"The History of Future Folk","release_date":"2013-05-31","poster_path":"\/erXaMc4YvsRyYiJ5Enomr6E7krt.jpg","popularity":0.598,"title":"The History of Future Folk","vote_average":6.8,"vote_count":3},{"adult":false,"backdrop_path":"\/m05HlwgzdmnkBQyAgCpj9G0rBww.jpg","id":19384,"original_title":"Dark Angel","release_date":"1990-09-30","poster_path":"\/609q9nMFrxPFDs3Z0I5YnZqQOiQ.jpg","popularity":0.598,"title":"Dark Angel","vote_average":6.2,"vote_count":12},{"adult":false,"backdrop_path":"\/leZpRrvAdZ5MPfLaU6U3uL2Z2Gs.jpg","id":34782,"original_title":"Battlespace","release_date":"2007-03-20","poster_path":"\/8QrEQqL8aXNmYbzCdEy1lnjcROh.jpg","popularity":"0.519325448313281","title":"Battlespace","vote_average":10,"vote_count":1},{"adult":false,"backdrop_path":"\/5XPPB44RQGfkBrbJxmtdndKz05n.jpg","id":19995,"original_title":"Avatar","release_date":"2009-12-18","poster_path":"\/tcqb9NHdw9SWs2a88KCDD4V8sVR.jpg","popularity":"20.5803455225098","title":"Avatar","vote_average":6.8,"vote_count":5376},{"adult":false,"backdrop_path":null,"id":84646,"original_title":"Deaden","release_date":"2006-01-01","poster_path":"\/cVB8u7jhSZpISiRBxp5ou44HqGe.jpg","popularity":0.299,"title":"Deaden","vote_average":0,"vote_count":0},{"adult":false,"backdrop_path":null,"id":20182,"original_title":"Alien Abduction","release_date":"1998-01-20","poster_path":"\/9BuG4nuU4s4hTzRXboFfKfQRVfI.jpg","popularity":0.368,"title":"Alien Abduction","vote_average":4.5,"vote_count":2}],"total_pages":1139,"total_results":22778},"trailers":{"quicktime":[],"youtube":[{"name":"Trailer 1","size":"HD","source":"zH3O-CeZckE","type":"Trailer"},{"name":"Red Band","size":"HD","source":"F1Dm9zRogpE","type":"Trailer"}]},"translations":{"translations":[{"iso_639_1":"en","name":"English","english_name":"English"},{"iso_639_1":"de","name":"Deutsch","english_name":"German"},{"iso_639_1":"pt","name":"Portugu\u00eas","english_name":"Portuguese"},{"iso_639_1":"nl","name":"Nederlands","english_name":"Dutch"},{"iso_639_1":"it","name":"Italiano","english_name":"Italian"},{"iso_639_1":"fr","name":"Fran\u00e7ais","english_name":"French"},{"iso_639_1":"zh","name":"\u4e2d\u56fd","english_name":"Mandarin"},{"iso_639_1":"ru","name":"P\u0443\u0441\u0441\u043a\u0438\u0439","english_name":"Russian"},{"iso_639_1":"cs","name":"\u010cesk\u00fd","english_name":"Czech"},{"iso_639_1":"hu","name":"Magyar","english_name":"Hungarian"},{"iso_639_1":"es","name":"Espa\u00f1ol","english_name":"Spanish"},{"iso_639_1":"th","name":"\u0e20\u0e32\u0e29\u0e32\u0e44\u0e17\u0e22","english_name":"Thai"},{"iso_639_1":"bg","name":"\u0431\u044a\u043b\u0433\u0430\u0440\u0441\u043a\u0438 \u0435\u0437\u0438\u043a","english_name":"Bulgarian"},{"iso_639_1":"el","name":"\u03b5\u03bb\u03bb\u03b7\u03bd\u03b9\u03ba\u03ac","english_name":"Greek"},{"iso_639_1":"tr","name":"T\u00fcrk\u00e7e","english_name":"Turkish"},{"iso_639_1":"pl","name":"Polski","english_name":"Polish"},{"iso_639_1":"sv","name":"svenska","english_name":"Swedish"},{"iso_639_1":"sk","name":"Sloven\u0161\u010dina","english_name":"Slovak"},{"iso_639_1":"da","name":"Dansk","english_name":"Danish"},{"iso_639_1":"fi","name":"suomi","english_name":"Finnish"},{"iso_639_1":"ko","name":"\ud55c\uad6d\uc5b4\/\uc870\uc120\ub9d0","english_name":"Korean"}]}} \ No newline at end of file diff --git a/test/Tmdb/Tests/TestCase.php b/test/Tmdb/Tests/TestCase.php index 0978b428..e254585c 100644 --- a/test/Tmdb/Tests/TestCase.php +++ b/test/Tmdb/Tests/TestCase.php @@ -52,7 +52,8 @@ protected function loadByFile($file) 'test/Tmdb/Tests/Resources/', $file ) - ) + ), + true ); } }