We could not synchronize checks via GitHub's checks API since Scrutinizer's GitHub App is not installed for this repository.
@@ 203-215 (lines=13) @@ | ||
200 | $this->assertEntryEquals($inputData, $entry); |
|
201 | } |
|
202 | ||
203 | public function testGetRelationFields() |
|
204 | { |
|
205 | $this->markTestIncomplete('Not correctly implemented'); |
|
206 | ||
207 | $this->crudPanel->setModel(User::class); |
|
208 | $this->crudPanel->addFields($this->userInputFieldsManyToMany, 'create'); |
|
209 | ||
210 | // TODO: fix method and documentation. when 'both' is passed as the $form value, the getRelationFields searches |
|
211 | // for relationship fields in the update fields. |
|
212 | $relationFields = $this->crudPanel->getRelationFields('both'); |
|
213 | ||
214 | $this->assertEquals($this->crudPanel->create_fields['roles'], array_last($relationFields)); |
|
215 | } |
|
216 | ||
217 | public function testGetRelationFieldsCreateForm() |
|
218 | { |
|
@@ 217-225 (lines=9) @@ | ||
214 | $this->assertEquals($this->crudPanel->create_fields['roles'], array_last($relationFields)); |
|
215 | } |
|
216 | ||
217 | public function testGetRelationFieldsCreateForm() |
|
218 | { |
|
219 | $this->crudPanel->setModel(User::class); |
|
220 | $this->crudPanel->addFields($this->userInputFieldsManyToMany, 'create'); |
|
221 | ||
222 | $relationFields = $this->crudPanel->getRelationFields('create'); |
|
223 | ||
224 | $this->assertEquals($this->crudPanel->create_fields['roles'], array_last($relationFields)); |
|
225 | } |
|
226 | ||
227 | public function testGetRelationFieldsUpdateForm() |
|
228 | { |
|
@@ 227-235 (lines=9) @@ | ||
224 | $this->assertEquals($this->crudPanel->create_fields['roles'], array_last($relationFields)); |
|
225 | } |
|
226 | ||
227 | public function testGetRelationFieldsUpdateForm() |
|
228 | { |
|
229 | $this->crudPanel->setModel(User::class); |
|
230 | $this->crudPanel->addFields($this->userInputFieldsManyToMany, 'update'); |
|
231 | ||
232 | $relationFields = $this->crudPanel->getRelationFields('update'); |
|
233 | ||
234 | $this->assertEquals($this->crudPanel->update_fields['roles'], array_last($relationFields)); |
|
235 | } |
|
236 | ||
237 | public function testGetRelationFieldsUnknownForm() |
|
238 | { |
|
@@ 251-259 (lines=9) @@ | ||
248 | $this->crudPanel->getRelationFields('unknownForm'); |
|
249 | } |
|
250 | ||
251 | public function testGetRelationFieldsDotNotation() |
|
252 | { |
|
253 | $this->crudPanel->setModel(User::class); |
|
254 | $this->crudPanel->addFields($this->userInputFieldsDotNotation, 'create'); |
|
255 | ||
256 | $relationFields = $this->crudPanel->getRelationFields('create'); |
|
257 | ||
258 | $this->assertEquals($this->crudPanel->create_fields['street'], array_last($relationFields)); |
|
259 | } |
|
260 | ||
261 | public function testGetRelationFieldsNoRelations() |
|
262 | { |
|
@@ 277-285 (lines=9) @@ | ||
274 | $this->assertEmpty($relationFields); |
|
275 | } |
|
276 | ||
277 | public function testGetRelationFieldsWithPivot() |
|
278 | { |
|
279 | $this->crudPanel->setModel(User::class); |
|
280 | $this->crudPanel->addFields($this->userInputFieldsDotNotation, 'create'); |
|
281 | ||
282 | $relationFields = $this->crudPanel->getRelationFieldsWithPivot('create'); |
|
283 | ||
284 | $this->assertEquals($this->crudPanel->create_fields['roles'], array_last($relationFields)); |
|
285 | } |
|
286 | ||
287 | public function testGetRelationFieldsWithPivotNoRelations() |
|
288 | { |