We could not synchronize checks via GitHub's checks API since Scrutinizer's GitHub App is not installed for this repository.
@@ 373-383 (lines=11) @@ | ||
370 | $this->assertEquals(['field2', 'field1'], $updateKeys); |
|
371 | } |
|
372 | ||
373 | public function testBeforeUnknownField() |
|
374 | { |
|
375 | $this->crudPanel->addFields($this->threeTextFieldsArray); |
|
376 | ||
377 | $this->crudPanel->beforeField('field4'); |
|
378 | ||
379 | $this->assertEquals(3, count($this->crudPanel->create_fields)); |
|
380 | $this->assertEquals(3, count($this->crudPanel->update_fields)); |
|
381 | $this->assertEquals(array_keys($this->expectedThreeTextFieldsArray), array_keys($this->crudPanel->create_fields)); |
|
382 | $this->assertEquals(array_keys($this->expectedThreeTextFieldsArray), array_keys($this->crudPanel->update_fields)); |
|
383 | } |
|
384 | ||
385 | public function testAfterField() |
|
386 | { |
|
@@ 461-471 (lines=11) @@ | ||
458 | $this->assertEquals(['field1', 'field2'], $updateKeys); |
|
459 | } |
|
460 | ||
461 | public function testAfterUnknownField() |
|
462 | { |
|
463 | $this->crudPanel->addFields($this->threeTextFieldsArray); |
|
464 | ||
465 | $this->crudPanel->afterField('field4'); |
|
466 | ||
467 | $this->assertEquals(3, count($this->crudPanel->create_fields)); |
|
468 | $this->assertEquals(3, count($this->crudPanel->update_fields)); |
|
469 | $this->assertEquals(array_keys($this->expectedThreeTextFieldsArray), array_keys($this->crudPanel->create_fields)); |
|
470 | $this->assertEquals(array_keys($this->expectedThreeTextFieldsArray), array_keys($this->crudPanel->update_fields)); |
|
471 | } |
|
472 | ||
473 | public function testRemoveFieldsByName() |
|
474 | { |
|
@@ 485-499 (lines=15) @@ | ||
482 | $this->assertEquals(['field2', 'field3'], array_keys($this->crudPanel->update_fields)); |
|
483 | } |
|
484 | ||
485 | public function testRemoveFieldsByNameInvalidArray() |
|
486 | { |
|
487 | $this->markTestIncomplete('Not correctly implemented'); |
|
488 | ||
489 | $this->crudPanel->addFields($this->threeTextFieldsArray); |
|
490 | ||
491 | // TODO: this should not work because the method specifically asks for an array of field keys, but it does |
|
492 | // because the removeField method will actually work with arrays instead of a string |
|
493 | $this->crudPanel->removeFields($this->twoTextFieldsArray); |
|
494 | ||
495 | $this->assertEquals(3, count($this->crudPanel->create_fields)); |
|
496 | $this->assertEquals(3, count($this->crudPanel->update_fields)); |
|
497 | $this->assertEquals(array_keys($this->expectedThreeTextFieldsArray), array_keys($this->crudPanel->create_fields)); |
|
498 | $this->assertEquals(array_keys($this->expectedThreeTextFieldsArray), array_keys($this->crudPanel->update_fields)); |
|
499 | } |
|
500 | ||
501 | public function testRemoveFieldsFromCreateForm() |
|
502 | { |
|
@@ 525-535 (lines=11) @@ | ||
522 | $this->assertEquals(['field2', 'field3'], array_keys($this->crudPanel->update_fields)); |
|
523 | } |
|
524 | ||
525 | public function testRemoveUnknownFields() |
|
526 | { |
|
527 | $this->crudPanel->addFields($this->threeTextFieldsArray); |
|
528 | ||
529 | $this->crudPanel->removeFields(['field4']); |
|
530 | ||
531 | $this->assertEquals(3, count($this->crudPanel->create_fields)); |
|
532 | $this->assertEquals(3, count($this->crudPanel->update_fields)); |
|
533 | $this->assertEquals(array_keys($this->expectedThreeTextFieldsArray), array_keys($this->crudPanel->create_fields)); |
|
534 | $this->assertEquals(array_keys($this->expectedThreeTextFieldsArray), array_keys($this->crudPanel->update_fields)); |
|
535 | } |
|
536 | ||
537 | public function testOrderFields() |
|
538 | { |