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