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