| @@ 3321-3354 (lines=34) @@ | ||
| 3318 | * @covers \eZ\Publish\Core\Repository\ContentService::updateContent |
|
| 3319 | * @dataProvider providerForTestUpdateContentNonRedundantFieldSet1 |
|
| 3320 | */ |
|
| 3321 | public function testUpdateContentNonRedundantFieldSet1($initialLanguageCode, $structFields, $spiFields) |
|
| 3322 | { |
|
| 3323 | $existingFields = array( |
|
| 3324 | new Field( |
|
| 3325 | array( |
|
| 3326 | 'id' => '100', |
|
| 3327 | 'fieldDefIdentifier' => 'identifier', |
|
| 3328 | 'value' => 'initialValue', |
|
| 3329 | 'languageCode' => 'eng-GB', |
|
| 3330 | ) |
|
| 3331 | ), |
|
| 3332 | ); |
|
| 3333 | ||
| 3334 | $fieldDefinitions = array( |
|
| 3335 | new FieldDefinition( |
|
| 3336 | array( |
|
| 3337 | 'id' => 'fieldDefinitionId', |
|
| 3338 | 'fieldTypeIdentifier' => 'fieldTypeIdentifier', |
|
| 3339 | 'isTranslatable' => false, |
|
| 3340 | 'identifier' => 'identifier', |
|
| 3341 | 'isRequired' => false, |
|
| 3342 | 'defaultValue' => 'defaultValue', |
|
| 3343 | ) |
|
| 3344 | ), |
|
| 3345 | ); |
|
| 3346 | ||
| 3347 | $this->assertForTestUpdateContentNonRedundantFieldSet( |
|
| 3348 | $initialLanguageCode, |
|
| 3349 | $structFields, |
|
| 3350 | $spiFields, |
|
| 3351 | $existingFields, |
|
| 3352 | $fieldDefinitions |
|
| 3353 | ); |
|
| 3354 | } |
|
| 3355 | ||
| 3356 | public function providerForTestUpdateContentNonRedundantFieldSet2() |
|
| 3357 | { |
|
| @@ 3534-3567 (lines=34) @@ | ||
| 3531 | * @covers \eZ\Publish\Core\Repository\ContentService::updateContent |
|
| 3532 | * @dataProvider providerForTestUpdateContentNonRedundantFieldSet2 |
|
| 3533 | */ |
|
| 3534 | public function testUpdateContentNonRedundantFieldSet2($initialLanguageCode, $structFields, $spiFields) |
|
| 3535 | { |
|
| 3536 | $existingFields = array( |
|
| 3537 | new Field( |
|
| 3538 | array( |
|
| 3539 | 'id' => '100', |
|
| 3540 | 'fieldDefIdentifier' => 'identifier', |
|
| 3541 | 'value' => 'initialValue', |
|
| 3542 | 'languageCode' => 'eng-GB', |
|
| 3543 | ) |
|
| 3544 | ), |
|
| 3545 | ); |
|
| 3546 | ||
| 3547 | $fieldDefinitions = array( |
|
| 3548 | new FieldDefinition( |
|
| 3549 | array( |
|
| 3550 | 'id' => 'fieldDefinitionId', |
|
| 3551 | 'fieldTypeIdentifier' => 'fieldTypeIdentifier', |
|
| 3552 | 'isTranslatable' => true, |
|
| 3553 | 'identifier' => 'identifier', |
|
| 3554 | 'isRequired' => false, |
|
| 3555 | 'defaultValue' => 'defaultValue', |
|
| 3556 | ) |
|
| 3557 | ), |
|
| 3558 | ); |
|
| 3559 | ||
| 3560 | $this->assertForTestUpdateContentNonRedundantFieldSet( |
|
| 3561 | $initialLanguageCode, |
|
| 3562 | $structFields, |
|
| 3563 | $spiFields, |
|
| 3564 | $existingFields, |
|
| 3565 | $fieldDefinitions |
|
| 3566 | ); |
|
| 3567 | } |
|
| 3568 | ||
| 3569 | public function providerForTestUpdateContentNonRedundantFieldSet3() |
|
| 3570 | { |
|