/**
  * {@inheritdoc}
  */
 protected function getExtensions()
 {
     /* @var $productUnitLabelFormatter ProductUnitLabelFormatter|\PHPUnit_Framework_MockObject_MockObject */
     $productUnitLabelFormatter = $this->getMockBuilder('OroB2B\\Bundle\\ProductBundle\\Formatter\\ProductUnitLabelFormatter')->disableOriginalConstructor()->getMock();
     $priceType = $this->preparePriceType();
     $entityType = $this->prepareProductEntityType();
     $optionalPriceType = $this->prepareOptionalPriceType();
     $currencySelectionType = new CurrencySelectionTypeStub();
     $requestProductItemType = $this->prepareRequestProductItemType();
     $productUnitSelectionType = $this->prepareProductUnitSelectionType();
     $requestProductType = new BaseRequestProductType($productUnitLabelFormatter);
     $requestProductType->setDataClass('OroB2B\\Bundle\\RFPBundle\\Entity\\RequestProduct');
     return [new PreloadedExtension([CollectionType::NAME => new CollectionType(), RequestProductItemCollectionType::NAME => new RequestProductItemCollectionType(), ProductUnitRemovedSelectionType::NAME => new StubProductUnitRemovedSelectionType(), ProductRemovedSelectType::NAME => new StubProductRemovedSelectType(), $priceType->getName() => $priceType, $entityType->getName() => $entityType, $optionalPriceType->getName() => $optionalPriceType, $requestProductType->getName() => $requestProductType, $requestProductItemType->getName() => $requestProductItemType, $currencySelectionType->getName() => $currencySelectionType, $productUnitSelectionType->getName() => $productUnitSelectionType], []), $this->getValidatorExtension(true)];
 }
 /**
  * {@inheritdoc}
  */
 protected function getExtensions()
 {
     /* @var $translator \PHPUnit_Framework_MockObject_MockObject|TranslatorInterface */
     $translator = $this->getMock('Symfony\\Component\\Translation\\TranslatorInterface');
     $priceType = $this->preparePriceType();
     $entityType = $this->prepareProductEntityType();
     $optionalPriceType = $this->prepareOptionalPriceType();
     $productSelectType = new ProductSelectTypeStub();
     $currencySelectionType = new CurrencySelectionTypeStub();
     $requestProductItemType = $this->prepareRequestProductItemType($translator);
     $productUnitSelectionType = $this->prepareProductUnitSelectionType();
     $requestProductType = new RequestProductType($translator);
     $requestProductType->setDataClass('OroB2B\\Bundle\\RFPBundle\\Entity\\RequestProduct');
     return [new PreloadedExtension([CollectionType::NAME => new CollectionType(), RequestProductCollectionType::NAME => new RequestProductCollectionType(), RequestProductItemCollectionType::NAME => new RequestProductItemCollectionType(), $priceType->getName() => $priceType, $entityType->getName() => $entityType, $optionalPriceType->getName() => $optionalPriceType, $productSelectType->getName() => $productSelectType, $requestProductType->getName() => $requestProductType, $currencySelectionType->getName() => $currencySelectionType, $requestProductItemType->getName() => $requestProductItemType, $productUnitSelectionType->getName() => $productUnitSelectionType], []), $this->getValidatorExtension(true)];
 }
Example #3
0
 /**
  * {@inheritdoc}
  */
 protected function getExtensions()
 {
     /* @var $translator \PHPUnit_Framework_MockObject_MockObject|TranslatorInterface */
     $translator = $this->getMockBuilder('Symfony\\Component\\Translation\\TranslatorInterface')->disableOriginalConstructor()->getMock();
     /* @var $productUnitLabelFormatter \PHPUnit_Framework_MockObject_MockObject|ProductUnitLabelFormatter */
     $productUnitLabelFormatter = $this->getMockBuilder('OroB2B\\Bundle\\ProductBundle\\Formatter\\ProductUnitLabelFormatter')->disableOriginalConstructor()->getMock();
     $userSelectType = new EntityType([1 => $this->getEntity('Oro\\Bundle\\UserBundle\\Entity\\User', 1), 2 => $this->getEntity('Oro\\Bundle\\UserBundle\\Entity\\User', 2)], 'oro_user_select');
     $priceType = $this->preparePriceType();
     $entityType = $this->prepareProductEntityType();
     $productSelectType = new ProductSelectTypeStub();
     $currencySelectionType = new CurrencySelectionTypeStub();
     $productUnitSelectionType = $this->prepareProductUnitSelectionType();
     $quoteProductOfferType = $this->prepareQuoteProductOfferType($translator);
     $quoteProductRequestType = $this->prepareQuoteProductRequestType($translator);
     $quoteProductType = new QuoteProductType($translator, $productUnitLabelFormatter, $this->quoteProductFormatter);
     $quoteProductType->setDataClass('OroB2B\\Bundle\\SaleBundle\\Entity\\QuoteProduct');
     return [new PreloadedExtension([OroDateTimeType::NAME => new OroDateTimeType(), CollectionType::NAME => new CollectionType(), QuoteProductOfferType::NAME => new QuoteProductOfferType($translator, $this->quoteProductOfferFormatter), QuoteProductCollectionType::NAME => new QuoteProductCollectionType(), QuoteProductOfferCollectionType::NAME => new QuoteProductOfferCollectionType(), QuoteProductRequestCollectionType::NAME => new QuoteProductRequestCollectionType(), $priceType->getName() => $priceType, $entityType->getName() => $entityType, $userSelectType->getName() => $userSelectType, $quoteProductType->getName() => $quoteProductType, $productSelectType->getName() => $productSelectType, $currencySelectionType->getName() => $currencySelectionType, $quoteProductOfferType->getName() => $quoteProductOfferType, $quoteProductRequestType->getName() => $quoteProductRequestType, $productUnitSelectionType->getName() => $productUnitSelectionType], []), $this->getValidatorExtension(true)];
 }
 /**
  * {@inheritdoc}
  */
 protected function getExtensions()
 {
     $priceType = $this->preparePriceType();
     $optionalPriceType = $this->prepareOptionalPriceType();
     $currencySelectionType = new CurrencySelectionTypeStub();
     $productUnitSelectionType = $this->prepareProductUnitSelectionType();
     return [new PreloadedExtension([ProductUnitRemovedSelectionType::NAME => new StubProductUnitRemovedSelectionType(), $priceType->getName() => $priceType, $optionalPriceType->getName() => $optionalPriceType, $currencySelectionType->getName() => $currencySelectionType, $productUnitSelectionType->getName() => $productUnitSelectionType], []), $this->getValidatorExtension(true)];
 }
 /**
  * @return array
  */
 protected function getExtensions()
 {
     $currencySelectType = new CurrencySelectionTypeStub();
     $entityIdentifierType = new EntityIdentifierType([1 => $this->getEntity(self::CUSTOMER_CLASS, 1), 2 => $this->getEntity(self::CUSTOMER_CLASS, 2), 3 => $this->getEntity(self::CUSTOMER_GROUP_CLASS, 3), 4 => $this->getEntity(self::CUSTOMER_GROUP_CLASS, 4), 5 => $this->getEntity(self::WEBSITE_CLASS, 5), 6 => $this->getEntity(self::WEBSITE_CLASS, 6)]);
     return [new PreloadedExtension([$currencySelectType->getName() => $currencySelectType, $entityIdentifierType->getName() => $entityIdentifierType], [])];
 }
 /**
  * {@inheritdoc}
  */
 protected function getExtensions()
 {
     $priceType = $this->preparePriceType();
     $entityType = $this->prepareProductEntityType();
     $optionalPriceType = $this->prepareOptionalPriceType();
     $productRemovedSelectType = new StubProductRemovedSelectType();
     $currencySelectionType = new CurrencySelectionTypeStub();
     $requestProductItemType = $this->prepareRequestProductItemType();
     $productUnitSelectionType = $this->prepareProductUnitSelectionType();
     return [new PreloadedExtension([CollectionType::NAME => new CollectionType(), RequestProductItemCollectionType::NAME => new RequestProductItemCollectionType(), ProductUnitRemovedSelectionType::NAME => new StubProductUnitRemovedSelectionType(), $priceType->getName() => $priceType, $entityType->getName() => $entityType, $optionalPriceType->getName() => $optionalPriceType, $productRemovedSelectType->getName() => $productRemovedSelectType, $requestProductItemType->getName() => $requestProductItemType, $currencySelectionType->getName() => $currencySelectionType, $productUnitSelectionType->getName() => $productUnitSelectionType], []), $this->getValidatorExtension(true)];
 }
 /**
  * {@inheritdoc}
  */
 protected function getExtensions()
 {
     $priceType = $this->preparePriceType();
     $entityType = $this->prepareProductEntityType();
     $productSelectType = new ProductSelectTypeStub();
     $currencySelectionType = new CurrencySelectionTypeStub();
     $productUnitSelectionType = $this->prepareProductUnitSelectionType();
     $quoteProductOfferType = $this->prepareQuoteProductOfferType($this->translator);
     $quoteProductRequestType = $this->prepareQuoteProductRequestType($this->translator);
     return [new PreloadedExtension([CollectionType::NAME => new CollectionType(), QuoteProductOfferCollectionType::NAME => new QuoteProductOfferCollectionType(), QuoteProductRequestCollectionType::NAME => new QuoteProductRequestCollectionType(), $priceType->getName() => $priceType, $entityType->getName() => $entityType, $productSelectType->getName() => $productSelectType, $currencySelectionType->getName() => $currencySelectionType, $quoteProductOfferType->getName() => $quoteProductOfferType, $quoteProductRequestType->getName() => $quoteProductRequestType, $productUnitSelectionType->getName() => $productUnitSelectionType], []), $this->getValidatorExtension(true)];
 }