| @@ 2499-2508 (lines=10) @@ | ||
| 2496 | /* END: Use Case */ |
|
| 2497 | ||
| 2498 | $actual = array(); |
|
| 2499 | foreach ($reloadedContent->getFields() as $field) { |
|
| 2500 | $actual[] = new Field( |
|
| 2501 | array( |
|
| 2502 | 'id' => 0, |
|
| 2503 | 'value' => ($field->value !== null ? true : null), // Actual value tested by FieldType integration tests |
|
| 2504 | 'languageCode' => $field->languageCode, |
|
| 2505 | 'fieldDefIdentifier' => $field->fieldDefIdentifier, |
|
| 2506 | ) |
|
| 2507 | ); |
|
| 2508 | } |
|
| 2509 | usort( |
|
| 2510 | $actual, |
|
| 2511 | function ($field1, $field2) { |
|
| @@ 5514-5523 (lines=10) @@ | ||
| 5511 | private function normalizeFields(array $fields) |
|
| 5512 | { |
|
| 5513 | $normalized = array(); |
|
| 5514 | foreach ($fields as $field) { |
|
| 5515 | $normalized[] = new Field( |
|
| 5516 | array( |
|
| 5517 | 'id' => 0, |
|
| 5518 | 'value' => ($field->value !== null ? true : null), |
|
| 5519 | 'languageCode' => $field->languageCode, |
|
| 5520 | 'fieldDefIdentifier' => $field->fieldDefIdentifier, |
|
| 5521 | ) |
|
| 5522 | ); |
|
| 5523 | } |
|
| 5524 | usort( |
|
| 5525 | $normalized, |
|
| 5526 | function ($field1, $field2) { |
|