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