| @@ 2555-2564 (lines=10) @@ | ||
| 2552 | /* END: Use Case */ |
|
| 2553 | ||
| 2554 | $actual = array(); |
|
| 2555 | foreach ($reloadedContent->getFields() as $field) { |
|
| 2556 | $actual[] = new Field( |
|
| 2557 | array( |
|
| 2558 | 'id' => 0, |
|
| 2559 | 'value' => ($field->value !== null ? true : null), // Actual value tested by FieldType integration tests |
|
| 2560 | 'languageCode' => $field->languageCode, |
|
| 2561 | 'fieldDefIdentifier' => $field->fieldDefIdentifier, |
|
| 2562 | ) |
|
| 2563 | ); |
|
| 2564 | } |
|
| 2565 | usort( |
|
| 2566 | $actual, |
|
| 2567 | function ($field1, $field2) { |
|
| @@ 5942-5952 (lines=11) @@ | ||
| 5939 | private function normalizeFields(array $fields) |
|
| 5940 | { |
|
| 5941 | $normalized = array(); |
|
| 5942 | foreach ($fields as $field) { |
|
| 5943 | $normalized[] = new Field( |
|
| 5944 | array( |
|
| 5945 | 'id' => 0, |
|
| 5946 | 'value' => ($field->value !== null ? true : null), |
|
| 5947 | 'languageCode' => $field->languageCode, |
|
| 5948 | 'fieldDefIdentifier' => $field->fieldDefIdentifier, |
|
| 5949 | 'fieldTypeIdentifier' => $field->fieldTypeIdentifier, |
|
| 5950 | ) |
|
| 5951 | ); |
|
| 5952 | } |
|
| 5953 | usort( |
|
| 5954 | $normalized, |
|
| 5955 | function ($field1, $field2) { |
|