Lint PHP code psr-12, add GH action
This commit is contained in:
@@ -1,17 +1,19 @@
|
||||
<?php
|
||||
|
||||
use Tests\Helpers\FormSubmissionDataFactory;
|
||||
|
||||
it('can submit form with dyanamic select option', function () {
|
||||
$user = $this->actingAsUser();
|
||||
$workspace = $this->createUserWorkspace($user);
|
||||
$form = $this->createForm($user, $workspace);
|
||||
|
||||
|
||||
$selectionsPreData = [];
|
||||
$form->properties = collect($form->properties)->map(function ($property) use (&$selectionsPreData) {
|
||||
if(in_array($property['type'], ['select','multi_select'])){
|
||||
$property["allow_creation"] = true;
|
||||
$selectionsPreData[$property['id']] = ($property['type'] == "select") ? "New single select - ".time() : ["New multi select - ".time()];
|
||||
if (in_array($property['type'], ['select', 'multi_select'])) {
|
||||
$property['allow_creation'] = true;
|
||||
$selectionsPreData[$property['id']] = ($property['type'] == 'select') ? 'New single select - '.time() : ['New multi select - '.time()];
|
||||
}
|
||||
|
||||
return $property;
|
||||
})->toArray();
|
||||
$form->update();
|
||||
@@ -21,6 +23,6 @@ it('can submit form with dyanamic select option', function () {
|
||||
->assertSuccessful()
|
||||
->assertJson([
|
||||
'type' => 'success',
|
||||
'message' => 'Form submission saved.'
|
||||
'message' => 'Form submission saved.',
|
||||
]);
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user