1<?php 2/** 3 * This file is part of the Tmdb PHP API created by Michael Roterman. 4 * 5 * For the full copyright and license information, please view the LICENSE 6 * file that was distributed with this source code. 7 * 8 * @package Tmdb 9 * @author Michael Roterman <michael@wtfz.net> 10 * @copyright (c) 2013, Michael Roterman 11 * @version 0.0.1 12 */ 13namespace Tmdb\Tests\Factory; 14 15use Tmdb\ApiToken; 16use Tmdb\Client; 17use Tmdb\Tests\TestCase as Base; 18 19abstract class TestCase extends Base 20{ 21 /** 22 * @var Client 23 */ 24 private $client; 25 26 public function __construct() 27 { 28 $this->client = new Client(new ApiToken('abcdef')); 29 } 30 31 protected $factory; 32 33 protected function getFactory() 34 { 35 $class = $this->getFactoryClass(); 36 37 return new $class($this->client->getHttpClient()); 38 } 39 40 protected function getHttpClient() 41 { 42 return $this->client->getHttpClient(); 43 } 44 45 abstract protected function getFactoryClass(); 46} 47