| @@ 3410-3443 (lines=34) @@ | ||
| 3407 | * @covers \eZ\Publish\Core\Repository\ContentService::updateContent |
|
| 3408 | * @dataProvider providerForTestUpdateContentNonRedundantFieldSet1 |
|
| 3409 | */ |
|
| 3410 | public function testUpdateContentNonRedundantFieldSet1($initialLanguageCode, $structFields, $spiFields) |
|
| 3411 | { |
|
| 3412 | $existingFields = [ |
|
| 3413 | new Field( |
|
| 3414 | [ |
|
| 3415 | 'id' => '100', |
|
| 3416 | 'fieldDefIdentifier' => 'identifier', |
|
| 3417 | 'value' => 'initialValue', |
|
| 3418 | 'languageCode' => 'eng-GB', |
|
| 3419 | ] |
|
| 3420 | ), |
|
| 3421 | ]; |
|
| 3422 | ||
| 3423 | $fieldDefinitions = [ |
|
| 3424 | new FieldDefinition( |
|
| 3425 | [ |
|
| 3426 | 'id' => 'fieldDefinitionId', |
|
| 3427 | 'fieldTypeIdentifier' => 'fieldTypeIdentifier', |
|
| 3428 | 'isTranslatable' => false, |
|
| 3429 | 'identifier' => 'identifier', |
|
| 3430 | 'isRequired' => false, |
|
| 3431 | 'defaultValue' => 'defaultValue', |
|
| 3432 | ] |
|
| 3433 | ), |
|
| 3434 | ]; |
|
| 3435 | ||
| 3436 | $this->assertForTestUpdateContentNonRedundantFieldSet( |
|
| 3437 | $initialLanguageCode, |
|
| 3438 | $structFields, |
|
| 3439 | $spiFields, |
|
| 3440 | $existingFields, |
|
| 3441 | $fieldDefinitions |
|
| 3442 | ); |
|
| 3443 | } |
|
| 3444 | ||
| 3445 | public function providerForTestUpdateContentNonRedundantFieldSet2() |
|
| 3446 | { |
|
| @@ 3623-3656 (lines=34) @@ | ||
| 3620 | * @covers \eZ\Publish\Core\Repository\ContentService::updateContent |
|
| 3621 | * @dataProvider providerForTestUpdateContentNonRedundantFieldSet2 |
|
| 3622 | */ |
|
| 3623 | public function testUpdateContentNonRedundantFieldSet2($initialLanguageCode, $structFields, $spiFields) |
|
| 3624 | { |
|
| 3625 | $existingFields = [ |
|
| 3626 | new Field( |
|
| 3627 | [ |
|
| 3628 | 'id' => '100', |
|
| 3629 | 'fieldDefIdentifier' => 'identifier', |
|
| 3630 | 'value' => 'initialValue', |
|
| 3631 | 'languageCode' => 'eng-GB', |
|
| 3632 | ] |
|
| 3633 | ), |
|
| 3634 | ]; |
|
| 3635 | ||
| 3636 | $fieldDefinitions = [ |
|
| 3637 | new FieldDefinition( |
|
| 3638 | [ |
|
| 3639 | 'id' => 'fieldDefinitionId', |
|
| 3640 | 'fieldTypeIdentifier' => 'fieldTypeIdentifier', |
|
| 3641 | 'isTranslatable' => true, |
|
| 3642 | 'identifier' => 'identifier', |
|
| 3643 | 'isRequired' => false, |
|
| 3644 | 'defaultValue' => 'defaultValue', |
|
| 3645 | ] |
|
| 3646 | ), |
|
| 3647 | ]; |
|
| 3648 | ||
| 3649 | $this->assertForTestUpdateContentNonRedundantFieldSet( |
|
| 3650 | $initialLanguageCode, |
|
| 3651 | $structFields, |
|
| 3652 | $spiFields, |
|
| 3653 | $existingFields, |
|
| 3654 | $fieldDefinitions |
|
| 3655 | ); |
|
| 3656 | } |
|
| 3657 | ||
| 3658 | public function providerForTestUpdateContentNonRedundantFieldSet3() |
|
| 3659 | { |
|