@@ 109-124 (lines=16) @@ | ||
106 | /** |
|
107 | * @test |
|
108 | */ |
|
109 | public function shouldExpectArgumentFactoryToUnderstandString() |
|
110 | { |
|
111 | $this->expectExceptionMessage("Argument 'dolor' could not be understood!"); |
|
112 | ||
113 | /** @var Request $request */ |
|
114 | $request = $this->createMock(Request::class); |
|
115 | ||
116 | $this->requestStack->method('getCurrentRequest')->willReturn($request); |
|
117 | ||
118 | /** @var Argument $argument */ |
|
119 | $argument = $this->createMock(Argument::class); |
|
120 | ||
121 | $this->argumentFactory->method('understandsString')->willReturn(false); |
|
122 | ||
123 | $this->compiler->buildArguments(['lorem' => 'dolor'], $request, []); |
|
124 | } |
|
125 | ||
126 | /** |
|
127 | * @test |
|
@@ 129-144 (lines=16) @@ | ||
126 | /** |
|
127 | * @test |
|
128 | */ |
|
129 | public function shouldExpectArgumentFactoryToUnderstandArray() |
|
130 | { |
|
131 | $this->expectExceptionMessage("Argument 'array(0=>'dolor',)' could not be understood!"); |
|
132 | ||
133 | /** @var Request $request */ |
|
134 | $request = $this->createMock(Request::class); |
|
135 | ||
136 | $this->requestStack->method('getCurrentRequest')->willReturn($request); |
|
137 | ||
138 | /** @var Argument $argument */ |
|
139 | $argument = $this->createMock(Argument::class); |
|
140 | ||
141 | $this->argumentFactory->method('understandsString')->willReturn(false); |
|
142 | ||
143 | $this->compiler->buildArguments(['lorem' => ['dolor']], $request, []); |
|
144 | } |
|
145 | ||
146 | /** |
|
147 | * @test |
|
@@ 149-164 (lines=16) @@ | ||
146 | /** |
|
147 | * @test |
|
148 | */ |
|
149 | public function shouldExpectArgumentToBeArrayOrString() |
|
150 | { |
|
151 | $this->expectExceptionMessage("Arguments must be defined as string or array!"); |
|
152 | ||
153 | /** @var Request $request */ |
|
154 | $request = $this->createMock(Request::class); |
|
155 | ||
156 | $this->requestStack->method('getCurrentRequest')->willReturn($request); |
|
157 | ||
158 | /** @var Argument $argument */ |
|
159 | $argument = $this->createMock(Argument::class); |
|
160 | ||
161 | $this->argumentFactory->method('understandsString')->willReturn(false); |
|
162 | ||
163 | $this->compiler->buildArguments(['lorem' => 3.1415], $request, []); |
|
164 | } |
|
165 | ||
166 | /** |
|
167 | * @test |