/** * @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()]])]; }
/** * Test getName */ public function testGetName() { $this->assertEquals(ProductUnitPrecisionType::NAME, $this->formType->getName()); }