Ejemplo n.º 1
0
 /**
  * {@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();
 }
 /**
  * @param array $inputData
  * @param array $expectedData
  *
  * @dataProvider formatPriceTypeLabelsProvider
  */
 public function testFormatPriceTypeLabels(array $inputData, array $expectedData)
 {
     $this->translator->expects($this->any())->method('trans')->will($this->returnCallback(function ($type) {
         return $type;
     }));
     $this->assertSame($expectedData, $this->formatter->formatPriceTypeLabels($inputData));
 }