public function setUp() { parent::setUp(); $this->formType = new AccountUserRoleSelectType(); $this->roleClass = 'RoleClass'; $this->formType->setRoleClass($this->roleClass); }
protected function setUp() { parent::setUp(); $this->addressFormatter = $this->getMockBuilder('Oro\\Bundle\\LocaleBundle\\Formatter\\AddressFormatter')->disableOriginalConstructor()->getMock(); $this->orderAddressSecurityProvider = $this->getMockBuilder('OroB2B\\Bundle\\OrderBundle\\Provider\\OrderAddressSecurityProvider')->disableOriginalConstructor()->getMock(); $this->orderAddressManager = $this->getMockBuilder('OroB2B\\Bundle\\OrderBundle\\Model\\OrderAddressManager')->disableOriginalConstructor()->getMock(); $this->serializer = $this->getMockBuilder('Oro\\Bundle\\ImportExportBundle\\Serializer\\Serializer')->disableOriginalConstructor()->getMock(); $this->formType = new OrderAddressType($this->addressFormatter, $this->orderAddressManager, $this->orderAddressSecurityProvider, $this->serializer); $this->formType->setDataClass('OroB2B\\Bundle\\OrderBundle\\Entity\\OrderAddress'); }
/** * {@inheritdoc} */ protected function setUp() { $this->translator = $this->getMock('Symfony\\Component\\Translation\\TranslatorInterface'); $this->translator->expects(static::any())->method('trans')->will(static::returnCallback(function ($id, array $params) { return $id . ':' . $params['{title}']; })); $this->formType = new ProductRemovedSelectType(); $this->formType->setTranslator($this->translator); parent::setUp(); }
/** * {@inheritdoc} */ protected function setUp() { $this->translator = $this->getMock('Symfony\\Component\\Translation\\TranslatorInterface'); $this->translator->expects(static::any())->method('trans')->willReturnCallback(function ($id, array $params) { return isset($params['{title}']) ? $id . ':' . $params['{title}'] : $id; }); $productUnitLabelFormatter = new ProductUnitLabelFormatter($this->translator); $this->formType = new ProductUnitRemovedSelectionType($productUnitLabelFormatter, $this->translator); $this->formType->setEntityClass('OroB2B\\Bundle\\ProductBundle\\Entity\\ProductUnit'); parent::setUp(); }
/** * {@inheritdoc} */ protected function setUp() { $this->quoteProductFormatter = $this->getMockBuilder('OroB2B\\Bundle\\SaleBundle\\Formatter\\QuoteProductFormatter')->disableOriginalConstructor()->getMock(); $this->quoteProductFormatter->expects($this->any())->method('formatTypeLabels')->will($this->returnCallback(function (array $types) { return $types; })); $this->quoteProductOfferFormatter = $this->getMockBuilder('OroB2B\\Bundle\\SaleBundle\\Formatter\\QuoteProductOfferFormatter')->disableOriginalConstructor()->getMock(); $this->quoteProductOfferFormatter->expects($this->any())->method('formatPriceTypeLabels')->will($this->returnCallback(function (array $types) { return $types; })); parent::setUp(); }
/** * {@inheritdoc} */ protected function setUp() { $this->formType = new PriceType(); $this->formType->setDataClass('Oro\\Bundle\\CurrencyBundle\\Model\\Price'); parent::setUp(); }
/** * {@inheritDoc} */ protected function setUp() { $this->formType = new ProductRowType(); $this->validator = $this->getMockBuilder('OroB2B\\Bundle\\ProductBundle\\Validator\\Constraints\\ProductBySkuValidator')->disableOriginalConstructor()->getMock(); parent::setUp(); }