Completed
Push — master ( 05c86c...ecb28e )
by Daniel
02:42
created

IndexTest   A

Complexity

Total Complexity 5

Size/Duplication

Total Lines 32
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 2

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 5
c 1
b 0
f 0
lcom 1
cbo 2
dl 0
loc 32
rs 10

5 Methods

Rating   Name   Duplication   Size   Complexity  
A setUp() 0 4 1
A testGetKey() 0 4 1
A testGetName() 0 4 1
A testGetUrl() 0 4 1
A testGetAffiliateId() 0 4 1
1
<?php
2
3
namespace Jobles\Tests\Core\Index;
4
5
use Jobles\Core\Index\Index;
6
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