| @@ 2557-2566 (lines=10) @@ | ||
| 2554 | /* END: Use Case */ |
|
| 2555 | ||
| 2556 | $actual = array(); |
|
| 2557 | foreach ($reloadedContent->getFields() as $field) { |
|
| 2558 | $actual[] = new Field( |
|
| 2559 | array( |
|
| 2560 | 'id' => 0, |
|
| 2561 | 'value' => ($field->value !== null ? true : null), // Actual value tested by FieldType integration tests |
|
| 2562 | 'languageCode' => $field->languageCode, |
|
| 2563 | 'fieldDefIdentifier' => $field->fieldDefIdentifier, |
|
| 2564 | ) |
|
| 2565 | ); |
|
| 2566 | } |
|
| 2567 | usort( |
|
| 2568 | $actual, |
|
| 2569 | function ($field1, $field2) { |
|
| @@ 5835-5845 (lines=11) @@ | ||
| 5832 | private function normalizeFields(array $fields) |
|
| 5833 | { |
|
| 5834 | $normalized = array(); |
|
| 5835 | foreach ($fields as $field) { |
|
| 5836 | $normalized[] = new Field( |
|
| 5837 | array( |
|
| 5838 | 'id' => 0, |
|
| 5839 | 'value' => ($field->value !== null ? true : null), |
|
| 5840 | 'languageCode' => $field->languageCode, |
|
| 5841 | 'fieldDefIdentifier' => $field->fieldDefIdentifier, |
|
| 5842 | 'fieldTypeIdentifier' => $field->fieldTypeIdentifier, |
|
| 5843 | ) |
|
| 5844 | ); |
|
| 5845 | } |
|
| 5846 | usort( |
|
| 5847 | $normalized, |
|
| 5848 | function ($field1, $field2) { |
|