| @@ 2498-2507 (lines=10) @@ | ||
| 2495 | /* END: Use Case */ |
|
| 2496 | ||
| 2497 | $actual = array(); |
|
| 2498 | foreach ($reloadedContent->getFields() as $field) { |
|
| 2499 | $actual[] = new Field( |
|
| 2500 | array( |
|
| 2501 | 'id' => 0, |
|
| 2502 | 'value' => ($field->value !== null ? true : null), // Actual value tested by FieldType integration tests |
|
| 2503 | 'languageCode' => $field->languageCode, |
|
| 2504 | 'fieldDefIdentifier' => $field->fieldDefIdentifier, |
|
| 2505 | ) |
|
| 2506 | ); |
|
| 2507 | } |
|
| 2508 | usort( |
|
| 2509 | $actual, |
|
| 2510 | function ($field1, $field2) { |
|
| @@ 5734-5744 (lines=11) @@ | ||
| 5731 | private function normalizeFields(array $fields) |
|
| 5732 | { |
|
| 5733 | $normalized = array(); |
|
| 5734 | foreach ($fields as $field) { |
|
| 5735 | $normalized[] = new Field( |
|
| 5736 | array( |
|
| 5737 | 'id' => 0, |
|
| 5738 | 'value' => ($field->value !== null ? true : null), |
|
| 5739 | 'languageCode' => $field->languageCode, |
|
| 5740 | 'fieldDefIdentifier' => $field->fieldDefIdentifier, |
|
| 5741 | 'fieldTypeIdentifier' => $field->fieldTypeIdentifier, |
|
| 5742 | ) |
|
| 5743 | ); |
|
| 5744 | } |
|
| 5745 | usort( |
|
| 5746 | $normalized, |
|
| 5747 | function ($field1, $field2) { |
|