| @@ 2559-2568 (lines=10) @@ | ||
| 2556 | /* END: Use Case */ |
|
| 2557 | ||
| 2558 | $actual = array(); |
|
| 2559 | foreach ($reloadedContent->getFields() as $field) { |
|
| 2560 | $actual[] = new Field( |
|
| 2561 | array( |
|
| 2562 | 'id' => 0, |
|
| 2563 | 'value' => ($field->value !== null ? true : null), // Actual value tested by FieldType integration tests |
|
| 2564 | 'languageCode' => $field->languageCode, |
|
| 2565 | 'fieldDefIdentifier' => $field->fieldDefIdentifier, |
|
| 2566 | ) |
|
| 2567 | ); |
|
| 2568 | } |
|
| 2569 | usort( |
|
| 2570 | $actual, |
|
| 2571 | function ($field1, $field2) { |
|
| @@ 5924-5934 (lines=11) @@ | ||
| 5921 | private function normalizeFields(array $fields) |
|
| 5922 | { |
|
| 5923 | $normalized = array(); |
|
| 5924 | foreach ($fields as $field) { |
|
| 5925 | $normalized[] = new Field( |
|
| 5926 | array( |
|
| 5927 | 'id' => 0, |
|
| 5928 | 'value' => ($field->value !== null ? true : null), |
|
| 5929 | 'languageCode' => $field->languageCode, |
|
| 5930 | 'fieldDefIdentifier' => $field->fieldDefIdentifier, |
|
| 5931 | 'fieldTypeIdentifier' => $field->fieldTypeIdentifier, |
|
| 5932 | ) |
|
| 5933 | ); |
|
| 5934 | } |
|
| 5935 | usort( |
|
| 5936 | $normalized, |
|
| 5937 | function ($field1, $field2) { |
|