Skip to content

Commit 02f07cd

Browse files
committed
fix tests
1 parent 083350e commit 02f07cd

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

phpunit/functional/Glpi/Asset/CustomFieldDefinitionTest.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -661,7 +661,7 @@ public function testSearchDropdownField(): void
661661
'custom_customtagsingle' => getItemByTypeName('Glpi\\CustomDropdown\\CustomTagDropdown', 'Tag01', true),
662662
'custom_customtagmulti' => [
663663
getItemByTypeName('Glpi\\CustomDropdown\\CustomTagDropdown', 'Tag01', true),
664-
getItemByTypeName('Glpi\\CustomDropdown\\CustomTagDropdown', 'Tag02', true)
664+
getItemByTypeName('Glpi\\CustomDropdown\\CustomTagDropdown', 'Tag02', true),
665665
],
666666
], ['custom_customtagsingle', 'custom_customtagmulti']);
667667

@@ -684,8 +684,8 @@ public function testSearchDropdownField(): void
684684
'field' => $multiple_dropdown_opt,
685685
'searchtype' => 'contains',
686686
'value' => 'Tag',
687-
]
688-
]
687+
],
688+
],
689689
], [$single_dropdown_opt, $multiple_dropdown_opt]);
690690

691691
$this->assertCount(1, $data['data']['rows']);

src/Glpi/Asset/CustomFieldType/DropdownType.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ public function getSearchOption(): ?array
155155
$opt['joinparams']['condition'] = [
156156
QueryFunction::jsonContains([
157157
'REFTABLE.custom_fields',
158-
'NEWTABLE.id',
158+
QueryFunction::cast('NEWTABLE.id', 'JSON'),
159159
new QueryExpression($DB::quoteValue('$."' . $this->custom_field->fields['id'] . '"')),
160160
]),
161161
];

tests/src/autoload/functions.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -792,7 +792,7 @@ function loadDataset()
792792
'name' => 'TestA',
793793
'entities_id' => '_test_root_entity',
794794
'custom_teststring' => 'Test String A',
795-
'custom_customtagsingle' => "1"
795+
'custom_customtagsingle' => "1",
796796
],
797797
[
798798
'name' => 'TestB',

0 commit comments

Comments
 (0)