| 1 | <?php  | 
            ||
| 7 | class IndexTest extends \PHPUnit_Framework_TestCase  | 
            ||
| 8 | { | 
            ||
| 9 | /**  | 
            ||
| 10 | * @var Index  | 
            ||
| 11 | */  | 
            ||
| 12 | private $index;  | 
            ||
| 13 | |||
| 14 | public function setUp()  | 
            ||
| 15 |     { | 
            ||
| 16 |         $this->index = new Index('index_key', 'Index Name', 'http://index.url', 'affId'); | 
            ||
| 17 | }  | 
            ||
| 18 | |||
| 19 | public function testGetKey()  | 
            ||
| 20 |     { | 
            ||
| 21 |         $this->assertEquals('index_key', $this->index->getKey()); | 
            ||
| 22 | }  | 
            ||
| 23 | |||
| 24 | public function testGetName()  | 
            ||
| 25 |     { | 
            ||
| 26 |         $this->assertEquals('Index Name', $this->index->getName()); | 
            ||
| 27 | }  | 
            ||
| 28 | |||
| 29 | public function testGetUrl()  | 
            ||
| 30 |     { | 
            ||
| 31 |         $this->assertEquals('http://index.url', $this->index->getUrl()); | 
            ||
| 32 | }  | 
            ||
| 33 | |||
| 34 | public function testGetAffiliateId()  | 
            ||
| 35 |     { | 
            ||
| 36 |         $this->assertEquals('affId', $this->index->getAffiliateId()); | 
            ||
| 37 | }  | 
            ||
| 38 | }  | 
            ||
| 39 |