| @@ 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) { |
|
| @@ 5888-5898 (lines=11) @@ | ||
| 5885 | private function normalizeFields(array $fields) |
|
| 5886 | { |
|
| 5887 | $normalized = array(); |
|
| 5888 | foreach ($fields as $field) { |
|
| 5889 | $normalized[] = new Field( |
|
| 5890 | array( |
|
| 5891 | 'id' => 0, |
|
| 5892 | 'value' => ($field->value !== null ? true : null), |
|
| 5893 | 'languageCode' => $field->languageCode, |
|
| 5894 | 'fieldDefIdentifier' => $field->fieldDefIdentifier, |
|
| 5895 | 'fieldTypeIdentifier' => $field->fieldTypeIdentifier, |
|
| 5896 | ) |
|
| 5897 | ); |
|
| 5898 | } |
|
| 5899 | usort( |
|
| 5900 | $normalized, |
|
| 5901 | function ($field1, $field2) { |
|