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

DocumentAnalysisSpec   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 18
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 0
Metric Value
wmc 2
lcom 0
cbo 1
dl 0
loc 18
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A it_is_initializable() 0 4 1
A it_should_get_tones() 0 10 1
1
<?php
2
3
namespace spec\IBM\Watson\ToneAnalyzer\Model;
4
5
use IBM\Watson\ToneAnalyzer\Model\DocumentAnalysis;
6
use PhpSpec\ObjectBehavior;
7
use Prophecy\Argument;
8
9
class DocumentAnalysisSpec extends ObjectBehavior
10
{
11
    function it_is_initializable()
12
    {
13
        $this->shouldHaveType(DocumentAnalysis::class);
14
    }
15
16
    function it_should_get_tones()
17
    {
18
        $analysis = $this::create([
19
            'tones' => [],
20
            'warning' => 'A warning'
21
        ]);
22
23
        $analysis->getTones()->shouldBeArray();
24
        $analysis->getWarning()->shouldBeString();
25
    }
26
}
27