| @@ 3352-3385 (lines=34) @@ | ||
| 3349 | * @covers \eZ\Publish\Core\Repository\ContentService::updateContent |
|
| 3350 | * @dataProvider providerForTestUpdateContentNonRedundantFieldSet1 |
|
| 3351 | */ |
|
| 3352 | public function testUpdateContentNonRedundantFieldSet1($initialLanguageCode, $structFields, $spiFields) |
|
| 3353 | { |
|
| 3354 | $existingFields = [ |
|
| 3355 | new Field( |
|
| 3356 | [ |
|
| 3357 | 'id' => '100', |
|
| 3358 | 'fieldDefIdentifier' => 'identifier', |
|
| 3359 | 'value' => 'initialValue', |
|
| 3360 | 'languageCode' => 'eng-GB', |
|
| 3361 | ] |
|
| 3362 | ), |
|
| 3363 | ]; |
|
| 3364 | ||
| 3365 | $fieldDefinitions = [ |
|
| 3366 | new FieldDefinition( |
|
| 3367 | [ |
|
| 3368 | 'id' => 'fieldDefinitionId', |
|
| 3369 | 'fieldTypeIdentifier' => 'fieldTypeIdentifier', |
|
| 3370 | 'isTranslatable' => false, |
|
| 3371 | 'identifier' => 'identifier', |
|
| 3372 | 'isRequired' => false, |
|
| 3373 | 'defaultValue' => 'defaultValue', |
|
| 3374 | ] |
|
| 3375 | ), |
|
| 3376 | ]; |
|
| 3377 | ||
| 3378 | $this->assertForTestUpdateContentNonRedundantFieldSet( |
|
| 3379 | $initialLanguageCode, |
|
| 3380 | $structFields, |
|
| 3381 | $spiFields, |
|
| 3382 | $existingFields, |
|
| 3383 | $fieldDefinitions |
|
| 3384 | ); |
|
| 3385 | } |
|
| 3386 | ||
| 3387 | public function providerForTestUpdateContentNonRedundantFieldSet2() |
|
| 3388 | { |
|
| @@ 3565-3598 (lines=34) @@ | ||
| 3562 | * @covers \eZ\Publish\Core\Repository\ContentService::updateContent |
|
| 3563 | * @dataProvider providerForTestUpdateContentNonRedundantFieldSet2 |
|
| 3564 | */ |
|
| 3565 | public function testUpdateContentNonRedundantFieldSet2($initialLanguageCode, $structFields, $spiFields) |
|
| 3566 | { |
|
| 3567 | $existingFields = [ |
|
| 3568 | new Field( |
|
| 3569 | [ |
|
| 3570 | 'id' => '100', |
|
| 3571 | 'fieldDefIdentifier' => 'identifier', |
|
| 3572 | 'value' => 'initialValue', |
|
| 3573 | 'languageCode' => 'eng-GB', |
|
| 3574 | ] |
|
| 3575 | ), |
|
| 3576 | ]; |
|
| 3577 | ||
| 3578 | $fieldDefinitions = [ |
|
| 3579 | new FieldDefinition( |
|
| 3580 | [ |
|
| 3581 | 'id' => 'fieldDefinitionId', |
|
| 3582 | 'fieldTypeIdentifier' => 'fieldTypeIdentifier', |
|
| 3583 | 'isTranslatable' => true, |
|
| 3584 | 'identifier' => 'identifier', |
|
| 3585 | 'isRequired' => false, |
|
| 3586 | 'defaultValue' => 'defaultValue', |
|
| 3587 | ] |
|
| 3588 | ), |
|
| 3589 | ]; |
|
| 3590 | ||
| 3591 | $this->assertForTestUpdateContentNonRedundantFieldSet( |
|
| 3592 | $initialLanguageCode, |
|
| 3593 | $structFields, |
|
| 3594 | $spiFields, |
|
| 3595 | $existingFields, |
|
| 3596 | $fieldDefinitions |
|
| 3597 | ); |
|
| 3598 | } |
|
| 3599 | ||
| 3600 | public function providerForTestUpdateContentNonRedundantFieldSet3() |
|
| 3601 | { |
|