Completed
Push — develop ( 9b1d71...66130e )
by Adam
03:07 queued 01:21
created

ToneScoreSpec   A

Complexity

Total Complexity 5

Size/Duplication

Total Lines 27
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 0
Metric Value
wmc 5
lcom 0
cbo 1
dl 0
loc 27
rs 10
c 0
b 0
f 0

5 Methods

Rating   Name   Duplication   Size   Complexity  
A let() 0 4 1
A it_is_initializable() 0 4 1
A it_should_get_score() 0 4 1
A it_should_get_id() 0 4 1
A it_should_get_name() 0 4 1
1
<?php
2
3
4
namespace spec\IBM\Watson\ToneAnalyzer\Model;
5
6
use IBM\Watson\ToneAnalyzer\Model\ToneScore;
7
use PhpSpec\ObjectBehavior;
8
9
class ToneScoreSpec extends ObjectBehavior
10
{
11
    function let()
12
    {
13
        $this->beConstructedWith(0.7523, 'analytical', 'Analytical');
14
    }
15
16
    function it_is_initializable()
17
    {
18
        $this->shouldBeAnInstanceOf(ToneScore::class);
19
    }
20
21
    function it_should_get_score()
22
    {
23
        $this->getScore()->shouldReturn(0.7523);
24
    }
25
26
    function it_should_get_id()
27
    {
28
        $this->getId()->shouldReturn('analytical');
29
    }
30
31
    function it_should_get_name()
32
    {
33
        $this->getName()->shouldReturn('Analytical');
34
    }
35
}
36