| @@ 3369-3402 (lines=34) @@ | ||
| 3366 | * @covers \eZ\Publish\Core\Repository\ContentService::updateContent |
|
| 3367 | * @dataProvider providerForTestUpdateContentNonRedundantFieldSet1 |
|
| 3368 | */ |
|
| 3369 | public function testUpdateContentNonRedundantFieldSet1($initialLanguageCode, $structFields, $spiFields) |
|
| 3370 | { |
|
| 3371 | $existingFields = array( |
|
| 3372 | new Field( |
|
| 3373 | array( |
|
| 3374 | 'id' => '100', |
|
| 3375 | 'fieldDefIdentifier' => 'identifier', |
|
| 3376 | 'value' => 'initialValue', |
|
| 3377 | 'languageCode' => 'eng-GB', |
|
| 3378 | ) |
|
| 3379 | ), |
|
| 3380 | ); |
|
| 3381 | ||
| 3382 | $fieldDefinitions = array( |
|
| 3383 | new FieldDefinition( |
|
| 3384 | array( |
|
| 3385 | 'id' => 'fieldDefinitionId', |
|
| 3386 | 'fieldTypeIdentifier' => 'fieldTypeIdentifier', |
|
| 3387 | 'isTranslatable' => false, |
|
| 3388 | 'identifier' => 'identifier', |
|
| 3389 | 'isRequired' => false, |
|
| 3390 | 'defaultValue' => 'defaultValue', |
|
| 3391 | ) |
|
| 3392 | ), |
|
| 3393 | ); |
|
| 3394 | ||
| 3395 | $this->assertForTestUpdateContentNonRedundantFieldSet( |
|
| 3396 | $initialLanguageCode, |
|
| 3397 | $structFields, |
|
| 3398 | $spiFields, |
|
| 3399 | $existingFields, |
|
| 3400 | $fieldDefinitions |
|
| 3401 | ); |
|
| 3402 | } |
|
| 3403 | ||
| 3404 | public function providerForTestUpdateContentNonRedundantFieldSet2() |
|
| 3405 | { |
|
| @@ 3582-3615 (lines=34) @@ | ||
| 3579 | * @covers \eZ\Publish\Core\Repository\ContentService::updateContent |
|
| 3580 | * @dataProvider providerForTestUpdateContentNonRedundantFieldSet2 |
|
| 3581 | */ |
|
| 3582 | public function testUpdateContentNonRedundantFieldSet2($initialLanguageCode, $structFields, $spiFields) |
|
| 3583 | { |
|
| 3584 | $existingFields = array( |
|
| 3585 | new Field( |
|
| 3586 | array( |
|
| 3587 | 'id' => '100', |
|
| 3588 | 'fieldDefIdentifier' => 'identifier', |
|
| 3589 | 'value' => 'initialValue', |
|
| 3590 | 'languageCode' => 'eng-GB', |
|
| 3591 | ) |
|
| 3592 | ), |
|
| 3593 | ); |
|
| 3594 | ||
| 3595 | $fieldDefinitions = array( |
|
| 3596 | new FieldDefinition( |
|
| 3597 | array( |
|
| 3598 | 'id' => 'fieldDefinitionId', |
|
| 3599 | 'fieldTypeIdentifier' => 'fieldTypeIdentifier', |
|
| 3600 | 'isTranslatable' => true, |
|
| 3601 | 'identifier' => 'identifier', |
|
| 3602 | 'isRequired' => false, |
|
| 3603 | 'defaultValue' => 'defaultValue', |
|
| 3604 | ) |
|
| 3605 | ), |
|
| 3606 | ); |
|
| 3607 | ||
| 3608 | $this->assertForTestUpdateContentNonRedundantFieldSet( |
|
| 3609 | $initialLanguageCode, |
|
| 3610 | $structFields, |
|
| 3611 | $spiFields, |
|
| 3612 | $existingFields, |
|
| 3613 | $fieldDefinitions |
|
| 3614 | ); |
|
| 3615 | } |
|
| 3616 | ||
| 3617 | public function providerForTestUpdateContentNonRedundantFieldSet3() |
|
| 3618 | { |
|