| @@ 2502-2511 (lines=10) @@ | ||
| 2499 | /* END: Use Case */ |
|
| 2500 | ||
| 2501 | $actual = array(); |
|
| 2502 | foreach ($reloadedContent->getFields() as $field) { |
|
| 2503 | $actual[] = new Field( |
|
| 2504 | array( |
|
| 2505 | 'id' => 0, |
|
| 2506 | 'value' => ($field->value !== null ? true : null), // Actual value tested by FieldType integration tests |
|
| 2507 | 'languageCode' => $field->languageCode, |
|
| 2508 | 'fieldDefIdentifier' => $field->fieldDefIdentifier, |
|
| 2509 | ) |
|
| 2510 | ); |
|
| 2511 | } |
|
| 2512 | usort( |
|
| 2513 | $actual, |
|
| 2514 | function ($field1, $field2) { |
|
| @@ 5716-5726 (lines=11) @@ | ||
| 5713 | private function normalizeFields(array $fields) |
|
| 5714 | { |
|
| 5715 | $normalized = array(); |
|
| 5716 | foreach ($fields as $field) { |
|
| 5717 | $normalized[] = new Field( |
|
| 5718 | array( |
|
| 5719 | 'id' => 0, |
|
| 5720 | 'value' => ($field->value !== null ? true : null), |
|
| 5721 | 'languageCode' => $field->languageCode, |
|
| 5722 | 'fieldDefIdentifier' => $field->fieldDefIdentifier, |
|
| 5723 | 'fieldTypeIdentifier' => $field->fieldTypeIdentifier, |
|
| 5724 | ) |
|
| 5725 | ); |
|
| 5726 | } |
|
| 5727 | usort( |
|
| 5728 | $normalized, |
|
| 5729 | function ($field1, $field2) { |
|