Completed
Push — master ( 81c6e7...6c71bd )
by Piotr
02:30
created

ProductionLineSpec   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 27
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Importance

Changes 0
Metric Value
wmc 2
lcom 0
cbo 2
dl 0
loc 27
rs 10
c 0
b 0
f 0
1
<?php
2
3
namespace spec\FSi\Bundle\AdminBundle\Factory;
4
5
use PhpSpec\ObjectBehavior;
6
use Prophecy\Argument;
7
8
class ProductionLineSpec extends ObjectBehavior
9
{
10
    /**
11
     * @param \FSi\Bundle\AdminBundle\Factory\Worker $workerFoo
12
     * @param \FSi\Bundle\AdminBundle\Factory\Worker $workerBar
13
     */
14
    function it_is_created_with_workers($workerFoo, $workerBar)
15
    {
16
        $this->beConstructedWith(array($workerFoo, $workerBar));
17
        $this->count()->shouldReturn(2);
18
        $this->getWorkers()->shouldReturn(array($workerFoo, $workerBar));
19
    }
20
21
    /**
22
     * @param \FSi\Bundle\AdminBundle\Factory\Worker $workerFoo
23
     * @param \FSi\Bundle\AdminBundle\Factory\Worker $workerBar
24
     * @param \FSi\Bundle\AdminBundle\Admin\Element $element
25
     */
26
    function it_work_on_element_with_workers($workerFoo, $workerBar, $element)
27
    {
28
        $this->beConstructedWith(array($workerFoo, $workerBar));
29
        $workerBar->mount($element)->shouldBeCalled();
30
        $workerFoo->mount($element)->shouldBeCalled();
31
32
        $this->workOn($element);
33
    }
34
}
35