Completed
Push — develop ( 4ff741...64bd10 )
by Tom
14:53
created

ClassifierTest   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 29
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 4
c 1
b 0
f 0
lcom 1
cbo 1
dl 0
loc 29
rs 10

4 Methods

Rating   Name   Duplication   Size   Complexity  
A setUp() 0 4 1
A testGetId() 0 4 1
A testGetName() 0 4 1
A testGetScore() 0 4 1
1
<?php
2
3
namespace Bobbyshaw\WatsonVisualRecognition\Tests;
4
5
use Bobbyshaw\WatsonVisualRecognition\Classifier;
6
7
/**
8
 * Class ClassifierTest
9
 * @package Bobbyshaw\WatsonVisualRecognition\Tests
10
 */
11
class ClassifierTest extends Base
12
{
13
    /** @var Classifier */
14
    private $classifier;
15
16
    private $id;
17
    private $name;
0 ignored issues
show
Comprehensibility introduced by
Consider using a different property name as you override a private property of the parent class.
Loading history...
18
    private $score;
19
20
    public function setUp()
21
    {
22
        $this->classifier = new Classifier($this->id, $this->name, $this->score);
23
    }
24
25
    public function testGetId()
26
    {
27
        $this->assertEquals($this->id, $this->classifier->getId());
28
    }
29
30
    public function testGetName()
31
    {
32
        $this->assertEquals($this->name, $this->classifier->getName());
33
    }
34
35
    public function testGetScore()
36
    {
37
        $this->assertEquals($this->score, $this->classifier->getScore());
38
    }
39
}
40