function it_adds_multiple_product_values_children_in_the_same_group(ProductValueInterface $valueOne, AttributeInterface $attributeOne, ProductValueInterface $valueTwo, AttributeInterface $attributeTwo, AttributeGroup $group, FormView $valueFormView, $viewUpdaterRegistry)
 {
     $valueOne->getAttribute()->willReturn($attributeOne);
     $valueOne->isRemovable()->willReturn(true);
     $valueOne->getLocale()->willReturn(null);
     $valueOne->getEntity()->willReturn(null);
     $attributeOne->getGroup()->willReturn($group);
     $attributeOne->getId()->willReturn(42);
     $attributeOne->getCode()->willReturn('name');
     $attributeOne->getLabel()->willReturn('Name');
     $attributeOne->getSortOrder()->willReturn(10);
     $attributeOne->getAttributeType()->willReturn('pim_catalog_text');
     $attributeOne->isLocalizable()->willReturn(false);
     $attributeOne->isScopable()->willReturn(false);
     $valueTwo->getAttribute()->willReturn($attributeTwo);
     $valueTwo->isRemovable()->willReturn(true);
     $valueTwo->getLocale()->willReturn(null);
     $valueTwo->getEntity()->willReturn(null);
     $attributeTwo->getGroup()->willReturn($group);
     $attributeTwo->getId()->willReturn(47);
     $attributeTwo->getCode()->willReturn('description');
     $attributeTwo->getLabel()->willReturn('Description');
     $attributeTwo->getSortOrder()->willReturn(15);
     $attributeTwo->getAttributeType()->willReturn('pim_catalog_text');
     $attributeTwo->isLocalizable()->willReturn(false);
     $attributeTwo->isScopable()->willReturn(false);
     $group->getId()->willReturn(1);
     $group->getCode()->willReturn('general');
     $group->getLabel()->willReturn('General');
     $this->addChildren($valueOne, $valueFormView);
     $this->addChildren($valueTwo, $valueFormView);
     $viewUpdaterRegistry->getUpdaters()->willReturn([]);
     $resultView = [1 => ['label' => 'General', 'attributes' => ['name' => ['id' => 42, 'isRemovable' => true, 'code' => 'name', 'label' => 'Name', 'sortOrder' => 10, 'allowValueCreation' => false, 'locale' => null, 'value' => $valueFormView], 'description' => ['id' => 47, 'isRemovable' => true, 'code' => 'description', 'label' => 'Description', 'sortOrder' => 15, 'allowValueCreation' => false, 'locale' => null, 'value' => $valueFormView]]]];
     $this->getView()->shouldReturn($resultView);
 }
 /**
  * Prepare attribute view
  *
  * @param AttributeInterface    $attribute
  * @param ProductValueInterface $value
  * @param FormView              $view
  *
  * @return array
  */
 protected function prepareAttributeView(AttributeInterface $attribute, ProductValueInterface $value, FormView $view)
 {
     $attributeView = ['id' => $attribute->getId(), 'isRemovable' => $value->isRemovable(), 'code' => $attribute->getCode(), 'label' => $attribute->getLabel(), 'sortOrder' => $attribute->getSortOrder(), 'allowValueCreation' => in_array($attribute->getAttributeType(), $this->choiceAttributeTypes), 'locale' => $value->getLocale()];
     if ($attribute->isScopable()) {
         $attributeView['values'] = array_merge($this->getAttributeValues($attribute, $value->getLocale()), [$value->getScope() => $view]);
         ksort($attributeView['values']);
     } else {
         $attributeView['value'] = $view;
     }
     $classes = $this->getAttributeClasses($attribute);
     if (!empty($classes)) {
         $attributeView['classes'] = $classes;
     }
     return $attributeView;
 }