| @@ 3384-3417 (lines=34) @@ | ||
| 3381 | * @covers \eZ\Publish\Core\Repository\ContentService::updateContent |
|
| 3382 | * @dataProvider providerForTestUpdateContentNonRedundantFieldSet1 |
|
| 3383 | */ |
|
| 3384 | public function testUpdateContentNonRedundantFieldSet1($initialLanguageCode, $structFields, $spiFields) |
|
| 3385 | { |
|
| 3386 | $existingFields = [ |
|
| 3387 | new Field( |
|
| 3388 | [ |
|
| 3389 | 'id' => '100', |
|
| 3390 | 'fieldDefIdentifier' => 'identifier', |
|
| 3391 | 'value' => 'initialValue', |
|
| 3392 | 'languageCode' => 'eng-GB', |
|
| 3393 | ] |
|
| 3394 | ), |
|
| 3395 | ]; |
|
| 3396 | ||
| 3397 | $fieldDefinitions = [ |
|
| 3398 | new FieldDefinition( |
|
| 3399 | [ |
|
| 3400 | 'id' => 'fieldDefinitionId', |
|
| 3401 | 'fieldTypeIdentifier' => 'fieldTypeIdentifier', |
|
| 3402 | 'isTranslatable' => false, |
|
| 3403 | 'identifier' => 'identifier', |
|
| 3404 | 'isRequired' => false, |
|
| 3405 | 'defaultValue' => 'defaultValue', |
|
| 3406 | ] |
|
| 3407 | ), |
|
| 3408 | ]; |
|
| 3409 | ||
| 3410 | $this->assertForTestUpdateContentNonRedundantFieldSet( |
|
| 3411 | $initialLanguageCode, |
|
| 3412 | $structFields, |
|
| 3413 | $spiFields, |
|
| 3414 | $existingFields, |
|
| 3415 | $fieldDefinitions |
|
| 3416 | ); |
|
| 3417 | } |
|
| 3418 | ||
| 3419 | public function providerForTestUpdateContentNonRedundantFieldSet2() |
|
| 3420 | { |
|
| @@ 3597-3630 (lines=34) @@ | ||
| 3594 | * @covers \eZ\Publish\Core\Repository\ContentService::updateContent |
|
| 3595 | * @dataProvider providerForTestUpdateContentNonRedundantFieldSet2 |
|
| 3596 | */ |
|
| 3597 | public function testUpdateContentNonRedundantFieldSet2($initialLanguageCode, $structFields, $spiFields) |
|
| 3598 | { |
|
| 3599 | $existingFields = [ |
|
| 3600 | new Field( |
|
| 3601 | [ |
|
| 3602 | 'id' => '100', |
|
| 3603 | 'fieldDefIdentifier' => 'identifier', |
|
| 3604 | 'value' => 'initialValue', |
|
| 3605 | 'languageCode' => 'eng-GB', |
|
| 3606 | ] |
|
| 3607 | ), |
|
| 3608 | ]; |
|
| 3609 | ||
| 3610 | $fieldDefinitions = [ |
|
| 3611 | new FieldDefinition( |
|
| 3612 | [ |
|
| 3613 | 'id' => 'fieldDefinitionId', |
|
| 3614 | 'fieldTypeIdentifier' => 'fieldTypeIdentifier', |
|
| 3615 | 'isTranslatable' => true, |
|
| 3616 | 'identifier' => 'identifier', |
|
| 3617 | 'isRequired' => false, |
|
| 3618 | 'defaultValue' => 'defaultValue', |
|
| 3619 | ] |
|
| 3620 | ), |
|
| 3621 | ]; |
|
| 3622 | ||
| 3623 | $this->assertForTestUpdateContentNonRedundantFieldSet( |
|
| 3624 | $initialLanguageCode, |
|
| 3625 | $structFields, |
|
| 3626 | $spiFields, |
|
| 3627 | $existingFields, |
|
| 3628 | $fieldDefinitions |
|
| 3629 | ); |
|
| 3630 | } |
|
| 3631 | ||
| 3632 | public function providerForTestUpdateContentNonRedundantFieldSet3() |
|
| 3633 | { |
|