1 | <?php |
||
25 | final class VariableBagTest extends TestCase |
||
26 | { |
||
27 | /** |
||
28 | * @covers ::assign |
||
29 | * @covers ::__construct |
||
30 | * @covers ::all |
||
31 | * @covers ::normalizeValue |
||
32 | * |
||
33 | * @param array<string, string|array<string>> $expected |
||
34 | * |
||
35 | * @dataProvider provideValidIterable |
||
36 | */ |
||
37 | public function testItCanBeInstantiatedWithAnIterable(iterable $iterable, array $expected): void |
||
43 | |||
44 | public function provideValidIterable(): iterable |
||
61 | |||
62 | /** |
||
63 | * @covers ::assign |
||
64 | * @covers ::normalizeValue |
||
65 | * @covers ::fetch |
||
66 | * |
||
67 | * @param mixed $value the value to be assign to the name |
||
68 | * @param string|array<string> $expected |
||
69 | * |
||
70 | * @dataProvider provideValidAssignParameters |
||
71 | */ |
||
72 | public function testItCanAssignNameAndValuesToTheBag(string $name, $value, $expected): void |
||
79 | |||
80 | public function provideValidAssignParameters(): iterable |
||
110 | |||
111 | /** |
||
112 | * @covers ::assign |
||
113 | * @covers ::normalizeValue |
||
114 | * @covers ::__construct |
||
115 | */ |
||
116 | public function testItWillFailToAssignUnsupportedType(): void |
||
122 | |||
123 | /** |
||
124 | * @covers ::assign |
||
125 | * @covers ::normalizeValue |
||
126 | * @covers ::__construct |
||
127 | */ |
||
128 | public function testItWillFailToAssignNestedList(): void |
||
134 | |||
135 | /** |
||
136 | * @covers ::__set_state |
||
137 | */ |
||
138 | public function testSetState(): void |
||
144 | |||
145 | public function testItCanReplaceItsValueWithThatOfAnotherInstance(): void |
||
167 | } |
||
168 |