| @@ 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) { |
|
| @@ 5780-5790 (lines=11) @@ | ||
| 5777 | private function normalizeFields(array $fields) |
|
| 5778 | { |
|
| 5779 | $normalized = array(); |
|
| 5780 | foreach ($fields as $field) { |
|
| 5781 | $normalized[] = new Field( |
|
| 5782 | array( |
|
| 5783 | 'id' => 0, |
|
| 5784 | 'value' => ($field->value !== null ? true : null), |
|
| 5785 | 'languageCode' => $field->languageCode, |
|
| 5786 | 'fieldDefIdentifier' => $field->fieldDefIdentifier, |
|
| 5787 | 'fieldTypeIdentifier' => $field->fieldTypeIdentifier, |
|
| 5788 | ) |
|
| 5789 | ); |
|
| 5790 | } |
|
| 5791 | usort( |
|
| 5792 | $normalized, |
|
| 5793 | function ($field1, $field2) { |
|