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