Completed
Pull Request — master (#11)
by adev
04:33
created

PriorityQueueSpec::it_is_initializable()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 4
rs 10
cc 1
eloc 2
nc 1
nop 0
1
<?php
2
3
namespace spec\Port\Steps;
4
5
use PhpSpec\ObjectBehavior;
6
7
class PriorityQueueSpec extends ObjectBehavior
8
{
9
    function it_is_initializable()
10
    {
11
        $this->shouldHaveType('Port\Steps\PriorityQueue');
12
    }
13
14
    function it_enforces_predictable_queue_order_for_elements_with_the_same_priority()
15
    {
16
        $this->insert('value_foo', 1);
17
        $this->insert('value_bar', 1);
18
        $this->insert('value_baz', 1);
19
20
        $this->extract()->shouldBe('value_foo');
21
        $this->extract()->shouldBe('value_bar');
22
        $this->extract()->shouldBe('value_baz');
23
    }
24
}
25