/**
  * @return void
  */
 public function testModifyMeta()
 {
     $this->locatorMock->expects($this->once())->method('getProduct')->willReturn($this->productMock);
     $this->productMock->expects($this->any())->method('getTypeId');
     $this->storeManagerMock->expects($this->exactly(2))->method('isSingleStoreMode');
     $this->typeUploadMock->expects($this->exactly(2))->method('toOptionArray');
     $this->shareableMock->expects($this->once())->method('toOptionArray');
     $this->urlBuilderMock->expects($this->exactly(2))->method('addSessionParam')->willReturnSelf();
     $this->urlBuilderMock->expects($this->exactly(2))->method('getUrl');
     $currencyMock = $this->getMock(\Magento\Directory\Model\Currency::class, [], [], '', false);
     $currencyMock->expects($this->once())->method('getCurrencySymbol');
     $storeMock = $this->getMockBuilder(\Magento\Store\Api\Data\StoreInterface::class)->setMethods(['getBaseCurrency'])->getMockForAbstractClass();
     $storeMock->expects($this->once())->method('getBaseCurrency')->willReturn($currencyMock);
     $this->locatorMock->expects($this->once())->method('getStore')->willReturn($storeMock);
     $this->arrayManagerMock->expects($this->exactly(9))->method('set')->willReturn([]);
     $this->assertEquals([], $this->links->modifyMeta([]));
 }
Пример #2
0
 /**
  * @return array
  */
 protected function getShareableColumn()
 {
     $shareableField['arguments']['data']['config'] = ['label' => __('Shareable'), 'formElement' => Form\Element\Select::NAME, 'componentType' => Form\Field::NAME, 'dataType' => Form\Element\DataType\Number::NAME, 'dataScope' => 'is_shareable', 'options' => $this->shareable->toOptionArray()];
     return $shareableField;
 }