| @@ 3363-3396 (lines=34) @@ | ||
| 3360 | * @covers \eZ\Publish\Core\Repository\ContentService::updateContent |
|
| 3361 | * @dataProvider providerForTestUpdateContentNonRedundantFieldSet1 |
|
| 3362 | */ |
|
| 3363 | public function testUpdateContentNonRedundantFieldSet1($initialLanguageCode, $structFields, $spiFields) |
|
| 3364 | { |
|
| 3365 | $existingFields = [ |
|
| 3366 | new Field( |
|
| 3367 | [ |
|
| 3368 | 'id' => '100', |
|
| 3369 | 'fieldDefIdentifier' => 'identifier', |
|
| 3370 | 'value' => 'initialValue', |
|
| 3371 | 'languageCode' => 'eng-GB', |
|
| 3372 | ] |
|
| 3373 | ), |
|
| 3374 | ]; |
|
| 3375 | ||
| 3376 | $fieldDefinitions = [ |
|
| 3377 | new FieldDefinition( |
|
| 3378 | [ |
|
| 3379 | 'id' => 'fieldDefinitionId', |
|
| 3380 | 'fieldTypeIdentifier' => 'fieldTypeIdentifier', |
|
| 3381 | 'isTranslatable' => false, |
|
| 3382 | 'identifier' => 'identifier', |
|
| 3383 | 'isRequired' => false, |
|
| 3384 | 'defaultValue' => 'defaultValue', |
|
| 3385 | ] |
|
| 3386 | ), |
|
| 3387 | ]; |
|
| 3388 | ||
| 3389 | $this->assertForTestUpdateContentNonRedundantFieldSet( |
|
| 3390 | $initialLanguageCode, |
|
| 3391 | $structFields, |
|
| 3392 | $spiFields, |
|
| 3393 | $existingFields, |
|
| 3394 | $fieldDefinitions |
|
| 3395 | ); |
|
| 3396 | } |
|
| 3397 | ||
| 3398 | public function providerForTestUpdateContentNonRedundantFieldSet2() |
|
| 3399 | { |
|
| @@ 3576-3609 (lines=34) @@ | ||
| 3573 | * @covers \eZ\Publish\Core\Repository\ContentService::updateContent |
|
| 3574 | * @dataProvider providerForTestUpdateContentNonRedundantFieldSet2 |
|
| 3575 | */ |
|
| 3576 | public function testUpdateContentNonRedundantFieldSet2($initialLanguageCode, $structFields, $spiFields) |
|
| 3577 | { |
|
| 3578 | $existingFields = [ |
|
| 3579 | new Field( |
|
| 3580 | [ |
|
| 3581 | 'id' => '100', |
|
| 3582 | 'fieldDefIdentifier' => 'identifier', |
|
| 3583 | 'value' => 'initialValue', |
|
| 3584 | 'languageCode' => 'eng-GB', |
|
| 3585 | ] |
|
| 3586 | ), |
|
| 3587 | ]; |
|
| 3588 | ||
| 3589 | $fieldDefinitions = [ |
|
| 3590 | new FieldDefinition( |
|
| 3591 | [ |
|
| 3592 | 'id' => 'fieldDefinitionId', |
|
| 3593 | 'fieldTypeIdentifier' => 'fieldTypeIdentifier', |
|
| 3594 | 'isTranslatable' => true, |
|
| 3595 | 'identifier' => 'identifier', |
|
| 3596 | 'isRequired' => false, |
|
| 3597 | 'defaultValue' => 'defaultValue', |
|
| 3598 | ] |
|
| 3599 | ), |
|
| 3600 | ]; |
|
| 3601 | ||
| 3602 | $this->assertForTestUpdateContentNonRedundantFieldSet( |
|
| 3603 | $initialLanguageCode, |
|
| 3604 | $structFields, |
|
| 3605 | $spiFields, |
|
| 3606 | $existingFields, |
|
| 3607 | $fieldDefinitions |
|
| 3608 | ); |
|
| 3609 | } |
|
| 3610 | ||
| 3611 | public function providerForTestUpdateContentNonRedundantFieldSet3() |
|
| 3612 | { |
|