| Total Complexity | 7 |
| Total Lines | 45 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 11 | final class SimpleSpec extends ObjectBehavior |
||
| 12 | { |
||
| 13 | function let() |
||
|
|
|||
| 14 | { |
||
| 15 | $this->beConstructedWith('foo', [ |
||
| 16 | 'foo' => 0, |
||
| 17 | 'bar' => 1, |
||
| 18 | 'baz' => 2, |
||
| 19 | ]); |
||
| 20 | } |
||
| 21 | |||
| 22 | function it_is_initializable() |
||
| 23 | { |
||
| 24 | $this->shouldHaveType(Simple::class); |
||
| 25 | } |
||
| 26 | |||
| 27 | function it_is_a_dictionary() |
||
| 28 | { |
||
| 29 | $this->shouldImplement(Dictionary::class); |
||
| 30 | } |
||
| 31 | |||
| 32 | function it_access_to_value_like_an_array() |
||
| 37 | } |
||
| 38 | |||
| 39 | function its_getvalues_should_return_dictionary_values() |
||
| 40 | { |
||
| 41 | $this->getValues()->shouldReturn([ |
||
| 42 | 'foo' => 0, |
||
| 43 | 'bar' => 1, |
||
| 44 | 'baz' => 2, |
||
| 45 | ]); |
||
| 46 | } |
||
| 47 | |||
| 48 | function its_getname_should_return_dictionary_name() |
||
| 49 | { |
||
| 50 | $this->getName()->shouldReturn('foo'); |
||
| 51 | } |
||
| 52 | |||
| 53 | function it_is_countable() |
||
| 56 | } |
||
| 57 | } |
||
| 58 |
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.