Conditions | 1 |
Paths | 1 |
Total Lines | 21 |
Code Lines | 14 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
34 | function it_creates_a_dictionary($container, MockInvokable $service) |
||
35 | { |
||
36 | $config = [ |
||
37 | 'service' => 'service.id', |
||
38 | 'method' => 'getYolo', |
||
39 | ]; |
||
40 | |||
41 | $container->get('service.id')->willReturn($service); |
||
42 | $service->getYolo()->willReturn([ |
||
43 | 'foo1' => 'bar1', |
||
44 | 'foo2' => 'bar2', |
||
45 | 'foo3' => 'bar3', |
||
46 | ]); |
||
47 | |||
48 | $dictionary = $this->create('yolo', $config); |
||
49 | |||
50 | $dictionary->getName()->shouldBe('yolo'); |
||
51 | $dictionary->getValues()->shouldBe([ |
||
52 | 'foo1' => 'bar1', |
||
53 | 'foo2' => 'bar2', |
||
54 | 'foo3' => 'bar3', |
||
55 | ]); |
||
69 |
Adding explicit visibility (
private
,protected
, orpublic
) is generally recommend to communicate to other developers how, and from where this method is intended to be used.