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