| @@ 2471-2480 (lines=10) @@ | ||
| 2468 | /* END: Use Case */ |
|
| 2469 | ||
| 2470 | $actual = array(); |
|
| 2471 | foreach ($reloadedContent->getFields() as $field) { |
|
| 2472 | $actual[] = new Field( |
|
| 2473 | array( |
|
| 2474 | 'id' => 0, |
|
| 2475 | 'value' => ($field->value !== null ? true : null), // Actual value tested by FieldType integration tests |
|
| 2476 | 'languageCode' => $field->languageCode, |
|
| 2477 | 'fieldDefIdentifier' => $field->fieldDefIdentifier, |
|
| 2478 | ) |
|
| 2479 | ); |
|
| 2480 | } |
|
| 2481 | usort( |
|
| 2482 | $actual, |
|
| 2483 | function ($field1, $field2) { |
|
| @@ 5267-5276 (lines=10) @@ | ||
| 5264 | private function normalizeFields(array $fields) |
|
| 5265 | { |
|
| 5266 | $normalized = array(); |
|
| 5267 | foreach ($fields as $field) { |
|
| 5268 | $normalized[] = new Field( |
|
| 5269 | array( |
|
| 5270 | 'id' => 0, |
|
| 5271 | 'value' => ($field->value !== null ? true : null), |
|
| 5272 | 'languageCode' => $field->languageCode, |
|
| 5273 | 'fieldDefIdentifier' => $field->fieldDefIdentifier, |
|
| 5274 | ) |
|
| 5275 | ); |
|
| 5276 | } |
|
| 5277 | usort( |
|
| 5278 | $normalized, |
|
| 5279 | function ($field1, $field2) { |
|