| @@ 3375-3408 (lines=34) @@ | ||
| 3372 | * @covers \eZ\Publish\Core\Repository\ContentService::updateContent |
|
| 3373 | * @dataProvider providerForTestUpdateContentNonRedundantFieldSet1 |
|
| 3374 | */ |
|
| 3375 | public function testUpdateContentNonRedundantFieldSet1($initialLanguageCode, $structFields, $spiFields) |
|
| 3376 | { |
|
| 3377 | $existingFields = [ |
|
| 3378 | new Field( |
|
| 3379 | [ |
|
| 3380 | 'id' => '100', |
|
| 3381 | 'fieldDefIdentifier' => 'identifier', |
|
| 3382 | 'value' => 'initialValue', |
|
| 3383 | 'languageCode' => 'eng-GB', |
|
| 3384 | ] |
|
| 3385 | ), |
|
| 3386 | ]; |
|
| 3387 | ||
| 3388 | $fieldDefinitions = [ |
|
| 3389 | new FieldDefinition( |
|
| 3390 | [ |
|
| 3391 | 'id' => 'fieldDefinitionId', |
|
| 3392 | 'fieldTypeIdentifier' => 'fieldTypeIdentifier', |
|
| 3393 | 'isTranslatable' => false, |
|
| 3394 | 'identifier' => 'identifier', |
|
| 3395 | 'isRequired' => false, |
|
| 3396 | 'defaultValue' => 'defaultValue', |
|
| 3397 | ] |
|
| 3398 | ), |
|
| 3399 | ]; |
|
| 3400 | ||
| 3401 | $this->assertForTestUpdateContentNonRedundantFieldSet( |
|
| 3402 | $initialLanguageCode, |
|
| 3403 | $structFields, |
|
| 3404 | $spiFields, |
|
| 3405 | $existingFields, |
|
| 3406 | $fieldDefinitions |
|
| 3407 | ); |
|
| 3408 | } |
|
| 3409 | ||
| 3410 | public function providerForTestUpdateContentNonRedundantFieldSet2() |
|
| 3411 | { |
|
| @@ 3588-3621 (lines=34) @@ | ||
| 3585 | * @covers \eZ\Publish\Core\Repository\ContentService::updateContent |
|
| 3586 | * @dataProvider providerForTestUpdateContentNonRedundantFieldSet2 |
|
| 3587 | */ |
|
| 3588 | public function testUpdateContentNonRedundantFieldSet2($initialLanguageCode, $structFields, $spiFields) |
|
| 3589 | { |
|
| 3590 | $existingFields = [ |
|
| 3591 | new Field( |
|
| 3592 | [ |
|
| 3593 | 'id' => '100', |
|
| 3594 | 'fieldDefIdentifier' => 'identifier', |
|
| 3595 | 'value' => 'initialValue', |
|
| 3596 | 'languageCode' => 'eng-GB', |
|
| 3597 | ] |
|
| 3598 | ), |
|
| 3599 | ]; |
|
| 3600 | ||
| 3601 | $fieldDefinitions = [ |
|
| 3602 | new FieldDefinition( |
|
| 3603 | [ |
|
| 3604 | 'id' => 'fieldDefinitionId', |
|
| 3605 | 'fieldTypeIdentifier' => 'fieldTypeIdentifier', |
|
| 3606 | 'isTranslatable' => true, |
|
| 3607 | 'identifier' => 'identifier', |
|
| 3608 | 'isRequired' => false, |
|
| 3609 | 'defaultValue' => 'defaultValue', |
|
| 3610 | ] |
|
| 3611 | ), |
|
| 3612 | ]; |
|
| 3613 | ||
| 3614 | $this->assertForTestUpdateContentNonRedundantFieldSet( |
|
| 3615 | $initialLanguageCode, |
|
| 3616 | $structFields, |
|
| 3617 | $spiFields, |
|
| 3618 | $existingFields, |
|
| 3619 | $fieldDefinitions |
|
| 3620 | ); |
|
| 3621 | } |
|
| 3622 | ||
| 3623 | public function providerForTestUpdateContentNonRedundantFieldSet3() |
|
| 3624 | { |
|