Completed
Pull Request — master (#16)
by Steve
01:55
created

BasicDiceSpec   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 19
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Importance

Changes 0
Metric Value
wmc 3
lcom 1
cbo 1
dl 0
loc 19
rs 10
c 0
b 0
f 0

3 Methods

Rating   Name   Duplication   Size   Complexity  
A let() 0 4 1
A it_is_initializable() 0 5 1
A it_rolls_an_integer() 0 4 1
1
<?php
2
3
namespace spec\MeadSteve\DiceApi\Dice;
4
5
use PhpSpec\ObjectBehavior;
6
use Prophecy\Argument;
7
8
class BasicDiceSpec extends ObjectBehavior
9
{
10
    private $diceSize = 6;
11
12
    function let()
13
    {
14
        $this->beConstructedWith($this->diceSize);
15
    }
16
    function it_is_initializable()
17
    {
18
        $this->shouldHaveType(\MeadSteve\DiceApi\Dice\BasicDice::class);
19
        $this->shouldHaveType(\MeadSteve\DiceApi\Dice::class);
20
    }
21
22
    function it_rolls_an_integer()
23
    {
24
        $this->roll()->shouldBeInteger();
25
    }
26
}
27