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