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