mirror of
https://github.com/Combodo/iTop.git
synced 2026-04-25 11:38:44 +02:00
N°7157 - Fix ValueSetEnum values as array must conserve keys
This commit is contained in:
@@ -64,7 +64,7 @@ class ValueSetEnumTest extends ItopTestCase
|
||||
"c" => "c",
|
||||
],
|
||||
],
|
||||
"Array, already ordered" => [
|
||||
"Array without keys, already ordered" => [
|
||||
["a", "b", "c"],
|
||||
[
|
||||
0 => "a",
|
||||
@@ -72,12 +72,20 @@ class ValueSetEnumTest extends ItopTestCase
|
||||
2 => "c",
|
||||
],
|
||||
],
|
||||
"Array with keys, already ordered" => [
|
||||
["a" => "a", "b" => "b", "c" => "c"],
|
||||
[
|
||||
"a" => "a",
|
||||
"b" => "b",
|
||||
"c" => "c",
|
||||
],
|
||||
],
|
||||
"Backed-Enum" => [
|
||||
ABCEnum::class,
|
||||
[
|
||||
0 => "a",
|
||||
1 => "b",
|
||||
2 => "c",
|
||||
"a" => "a",
|
||||
"b" => "b",
|
||||
"c" => "c",
|
||||
],
|
||||
true, // Is the input value a backed enum?
|
||||
],
|
||||
|
||||
Reference in New Issue
Block a user