'30000.4'], ]; $collectionFactory = $this->createPartialMock( \Magento\Framework\Data\Form\Element\CollectionFactory::class, ['create'] ); $storeManager = $this->createMock(\Magento\Store\Model\StoreManager::class); $localeCurrency = $this->createMock(\Magento\Framework\Locale\Currency::class); $currency = $this->createMock(\Magento\Framework\Currency::class); $currency->expects( $this->any() )->method( 'toCurrency' )->willReturn('30.000,40'); $localeCurrency->expects( $this->any() )->method( 'getCurrency' )->willReturn($currency); $store = $this->createMock(\Magento\Store\Model\Store::class); $storeManager->expects( $this->any() )->method( 'getStore' )->willReturn($store); $factory = $this->createMock(\Magento\Framework\Data\Form\Element\Factory::class); $this->model = $objectManager->getObject( \Magento\Weee\Block\Element\Weee\Tax::class, [ 'factoryElement' => $factory, 'factoryCollection' => $collectionFactory, 'storeManager' => $storeManager, 'localeCurrency' => $localeCurrency ] ); $this->model->setValue($inputValue); $this->model->setEntityAttribute(new \Magento\Framework\DataObject(['store_id' => 1])); $return = $this->model->getEscapedValue(); $this->assertEquals( [ ['value' => '30.000,40'], ], $return ); } }