/** * @return array */ protected function getExtensions() { $productUnitPrecision = new ProductUnitPrecisionType(); $productUnitPrecision->setDataClass('OroB2B\\Bundle\\ProductBundle\\Entity\\ProductUnitPrecision'); $stubEnumSelectType = new StubEnumSelectType(); return [new PreloadedExtension([$stubEnumSelectType->getName() => $stubEnumSelectType, ImageType::NAME => new StubImageType(), OroCollectionType::NAME => new OroCollectionType(), ProductUnitPrecisionType::NAME => $productUnitPrecision, ProductUnitPrecisionCollectionType::NAME => new ProductUnitPrecisionCollectionType(), ProductUnitSelectionType::NAME => new StubProductUnitSelectionType(['item' => (new ProductUnit())->setCode('item'), 'kg' => (new ProductUnit())->setCode('kg')], ProductUnitSelectionType::NAME)], ['form' => [new TooltipFormExtension(), new IntegerExtension()]])]; }
/** * {@inheritdoc} */ protected function setUp() { $this->formType = new ProductUnitPrecisionType(); $this->formType->setDataClass(self::DATA_CLASS); parent::setUp(); }