| 1 | <?php |
||
| 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 |