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