| @@ 3354-3387 (lines=34) @@ | ||
| 3351 | * @covers \eZ\Publish\Core\Repository\ContentService::updateContent |
|
| 3352 | * @dataProvider providerForTestUpdateContentNonRedundantFieldSet1 |
|
| 3353 | */ |
|
| 3354 | public function testUpdateContentNonRedundantFieldSet1($initialLanguageCode, $structFields, $spiFields) |
|
| 3355 | { |
|
| 3356 | $existingFields = array( |
|
| 3357 | new Field( |
|
| 3358 | array( |
|
| 3359 | 'id' => '100', |
|
| 3360 | 'fieldDefIdentifier' => 'identifier', |
|
| 3361 | 'value' => 'initialValue', |
|
| 3362 | 'languageCode' => 'eng-GB', |
|
| 3363 | ) |
|
| 3364 | ), |
|
| 3365 | ); |
|
| 3366 | ||
| 3367 | $fieldDefinitions = array( |
|
| 3368 | new FieldDefinition( |
|
| 3369 | array( |
|
| 3370 | 'id' => 'fieldDefinitionId', |
|
| 3371 | 'fieldTypeIdentifier' => 'fieldTypeIdentifier', |
|
| 3372 | 'isTranslatable' => false, |
|
| 3373 | 'identifier' => 'identifier', |
|
| 3374 | 'isRequired' => false, |
|
| 3375 | 'defaultValue' => 'defaultValue', |
|
| 3376 | ) |
|
| 3377 | ), |
|
| 3378 | ); |
|
| 3379 | ||
| 3380 | $this->assertForTestUpdateContentNonRedundantFieldSet( |
|
| 3381 | $initialLanguageCode, |
|
| 3382 | $structFields, |
|
| 3383 | $spiFields, |
|
| 3384 | $existingFields, |
|
| 3385 | $fieldDefinitions |
|
| 3386 | ); |
|
| 3387 | } |
|
| 3388 | ||
| 3389 | public function providerForTestUpdateContentNonRedundantFieldSet2() |
|
| 3390 | { |
|
| @@ 3567-3600 (lines=34) @@ | ||
| 3564 | * @covers \eZ\Publish\Core\Repository\ContentService::updateContent |
|
| 3565 | * @dataProvider providerForTestUpdateContentNonRedundantFieldSet2 |
|
| 3566 | */ |
|
| 3567 | public function testUpdateContentNonRedundantFieldSet2($initialLanguageCode, $structFields, $spiFields) |
|
| 3568 | { |
|
| 3569 | $existingFields = array( |
|
| 3570 | new Field( |
|
| 3571 | array( |
|
| 3572 | 'id' => '100', |
|
| 3573 | 'fieldDefIdentifier' => 'identifier', |
|
| 3574 | 'value' => 'initialValue', |
|
| 3575 | 'languageCode' => 'eng-GB', |
|
| 3576 | ) |
|
| 3577 | ), |
|
| 3578 | ); |
|
| 3579 | ||
| 3580 | $fieldDefinitions = array( |
|
| 3581 | new FieldDefinition( |
|
| 3582 | array( |
|
| 3583 | 'id' => 'fieldDefinitionId', |
|
| 3584 | 'fieldTypeIdentifier' => 'fieldTypeIdentifier', |
|
| 3585 | 'isTranslatable' => true, |
|
| 3586 | 'identifier' => 'identifier', |
|
| 3587 | 'isRequired' => false, |
|
| 3588 | 'defaultValue' => 'defaultValue', |
|
| 3589 | ) |
|
| 3590 | ), |
|
| 3591 | ); |
|
| 3592 | ||
| 3593 | $this->assertForTestUpdateContentNonRedundantFieldSet( |
|
| 3594 | $initialLanguageCode, |
|
| 3595 | $structFields, |
|
| 3596 | $spiFields, |
|
| 3597 | $existingFields, |
|
| 3598 | $fieldDefinitions |
|
| 3599 | ); |
|
| 3600 | } |
|
| 3601 | ||
| 3602 | public function providerForTestUpdateContentNonRedundantFieldSet3() |
|
| 3603 | { |
|