| @@ 3343-3376 (lines=34) @@ | ||
| 3340 | * @covers \eZ\Publish\Core\Repository\ContentService::updateContent |
|
| 3341 | * @dataProvider providerForTestUpdateContentNonRedundantFieldSet1 |
|
| 3342 | */ |
|
| 3343 | public function testUpdateContentNonRedundantFieldSet1($initialLanguageCode, $structFields, $spiFields) |
|
| 3344 | { |
|
| 3345 | $existingFields = array( |
|
| 3346 | new Field( |
|
| 3347 | array( |
|
| 3348 | 'id' => '100', |
|
| 3349 | 'fieldDefIdentifier' => 'identifier', |
|
| 3350 | 'value' => 'initialValue', |
|
| 3351 | 'languageCode' => 'eng-GB', |
|
| 3352 | ) |
|
| 3353 | ), |
|
| 3354 | ); |
|
| 3355 | ||
| 3356 | $fieldDefinitions = array( |
|
| 3357 | new FieldDefinition( |
|
| 3358 | array( |
|
| 3359 | 'id' => 'fieldDefinitionId', |
|
| 3360 | 'fieldTypeIdentifier' => 'fieldTypeIdentifier', |
|
| 3361 | 'isTranslatable' => false, |
|
| 3362 | 'identifier' => 'identifier', |
|
| 3363 | 'isRequired' => false, |
|
| 3364 | 'defaultValue' => 'defaultValue', |
|
| 3365 | ) |
|
| 3366 | ), |
|
| 3367 | ); |
|
| 3368 | ||
| 3369 | $this->assertForTestUpdateContentNonRedundantFieldSet( |
|
| 3370 | $initialLanguageCode, |
|
| 3371 | $structFields, |
|
| 3372 | $spiFields, |
|
| 3373 | $existingFields, |
|
| 3374 | $fieldDefinitions |
|
| 3375 | ); |
|
| 3376 | } |
|
| 3377 | ||
| 3378 | public function providerForTestUpdateContentNonRedundantFieldSet2() |
|
| 3379 | { |
|
| @@ 3556-3589 (lines=34) @@ | ||
| 3553 | * @covers \eZ\Publish\Core\Repository\ContentService::updateContent |
|
| 3554 | * @dataProvider providerForTestUpdateContentNonRedundantFieldSet2 |
|
| 3555 | */ |
|
| 3556 | public function testUpdateContentNonRedundantFieldSet2($initialLanguageCode, $structFields, $spiFields) |
|
| 3557 | { |
|
| 3558 | $existingFields = array( |
|
| 3559 | new Field( |
|
| 3560 | array( |
|
| 3561 | 'id' => '100', |
|
| 3562 | 'fieldDefIdentifier' => 'identifier', |
|
| 3563 | 'value' => 'initialValue', |
|
| 3564 | 'languageCode' => 'eng-GB', |
|
| 3565 | ) |
|
| 3566 | ), |
|
| 3567 | ); |
|
| 3568 | ||
| 3569 | $fieldDefinitions = array( |
|
| 3570 | new FieldDefinition( |
|
| 3571 | array( |
|
| 3572 | 'id' => 'fieldDefinitionId', |
|
| 3573 | 'fieldTypeIdentifier' => 'fieldTypeIdentifier', |
|
| 3574 | 'isTranslatable' => true, |
|
| 3575 | 'identifier' => 'identifier', |
|
| 3576 | 'isRequired' => false, |
|
| 3577 | 'defaultValue' => 'defaultValue', |
|
| 3578 | ) |
|
| 3579 | ), |
|
| 3580 | ); |
|
| 3581 | ||
| 3582 | $this->assertForTestUpdateContentNonRedundantFieldSet( |
|
| 3583 | $initialLanguageCode, |
|
| 3584 | $structFields, |
|
| 3585 | $spiFields, |
|
| 3586 | $existingFields, |
|
| 3587 | $fieldDefinitions |
|
| 3588 | ); |
|
| 3589 | } |
|
| 3590 | ||
| 3591 | public function providerForTestUpdateContentNonRedundantFieldSet3() |
|
| 3592 | { |
|