diff --git a/app/code/Magento/ConfigurableProduct/Test/Unit/Block/Product/View/Type/ConfigurableTest.php b/app/code/Magento/ConfigurableProduct/Test/Unit/Block/Product/View/Type/ConfigurableTest.php index 7fd66541adc7b..9ab288030cdd0 100644 --- a/app/code/Magento/ConfigurableProduct/Test/Unit/Block/Product/View/Type/ConfigurableTest.php +++ b/app/code/Magento/ConfigurableProduct/Test/Unit/Block/Product/View/Type/ConfigurableTest.php @@ -15,79 +15,79 @@ class ConfigurableTest extends \PHPUnit\Framework\TestCase { /** - * @var \Magento\Catalog\Block\Product\Context|\PHPUnit_Framework_MockObject_MockObject + * @var \Magento\Catalog\Block\Product\Context|\PHPUnit\Framework\MockObject\MockObject */ private $context; /** - * @var \Magento\Framework\Stdlib\ArrayUtils|\PHPUnit_Framework_MockObject_MockObject + * @var \Magento\Framework\Stdlib\ArrayUtils|\PHPUnit\Framework\MockObject\MockObject */ private $arrayUtils; /** - * @var \Magento\Framework\Json\EncoderInterface|\PHPUnit_Framework_MockObject_MockObject + * @var \Magento\Framework\Json\EncoderInterface|\PHPUnit\Framework\MockObject\MockObject */ private $jsonEncoder; /** - * @var \Magento\ConfigurableProduct\Helper\Data|\PHPUnit_Framework_MockObject_MockObject + * @var \Magento\ConfigurableProduct\Helper\Data|\PHPUnit\Framework\MockObject\MockObject */ private $helper; /** - * @var \Magento\Catalog\Helper\Product|\PHPUnit_Framework_MockObject_MockObject + * @var \Magento\Catalog\Helper\Product|\PHPUnit\Framework\MockObject\MockObject */ private $product; /** - * @var \Magento\Customer\Helper\Session\CurrentCustomer|\PHPUnit_Framework_MockObject_MockObject + * @var \Magento\Customer\Helper\Session\CurrentCustomer|\PHPUnit\Framework\MockObject\MockObject */ private $currentCustomer; /** - * @var \Magento\Framework\Pricing\PriceCurrencyInterface|\PHPUnit_Framework_MockObject_MockObject + * @var \Magento\Framework\Pricing\PriceCurrencyInterface|\PHPUnit\Framework\MockObject\MockObject */ private $priceCurrency; /** - * @var \Magento\Directory\Model\Currency|\PHPUnit_Framework_MockObject_MockObject + * @var \Magento\Directory\Model\Currency|\PHPUnit\Framework\MockObject\MockObject */ private $currency; /** - * @var \Magento\ConfigurableProduct\Model\ConfigurableAttributeData|\PHPUnit_Framework_MockObject_MockObject + * @var \Magento\ConfigurableProduct\Model\ConfigurableAttributeData|\PHPUnit\Framework\MockObject\MockObject */ private $configurableAttributeData; /** - * @var \Magento\Framework\Locale\Format|\PHPUnit_Framework_MockObject_MockObject + * @var \Magento\Framework\Locale\Format|\PHPUnit\Framework\MockObject\MockObject */ private $localeFormat; /** - * @var \Magento\ConfigurableProduct\Block\Product\View\Type\Configurable|\PHPUnit_Framework_MockObject_MockObject + * @var \Magento\ConfigurableProduct\Block\Product\View\Type\Configurable|\PHPUnit\Framework\MockObject\MockObject */ private $block; /** - * @var \Magento\Store\Model\StoreManagerInterface|\PHPUnit_Framework_MockObject_MockObject + * @var \Magento\Store\Model\StoreManagerInterface|\PHPUnit\Framework\MockObject\MockObject */ private $storeManager; /** - * @var \PHPUnit_Framework_MockObject_MockObject + * @var \PHPUnit\Framework\MockObject\MockObject */ private $customerSession; /** - * @var \PHPUnit_Framework_MockObject_MockObject + * @var \PHPUnit\Framework\MockObject\MockObject */ private $variationPricesMock; /** * {@inheritDoc} */ - protected function setUp() + protected function setUp(): void { $this->mockContextObject(); @@ -230,7 +230,7 @@ public function cacheKeyProvider(): array * @param string|null $priceCurrency * @param string|null $customerGroupId */ - public function testGetCacheKeyInfo(array $expected, string $priceCurrency = null, string $customerGroupId = null) + public function testGetCacheKeyInfo(array $expected, string $priceCurrency = null, string $customerGroupId = null): void { $storeMock = $this->getMockBuilder(\Magento\Store\Api\Data\StoreInterface::class) ->setMethods(['getCurrentCurrency']) @@ -258,7 +258,7 @@ public function testGetCacheKeyInfo(array $expected, string $priceCurrency = nul /** * Check that getJsonConfig() method returns expected value */ - public function testGetJsonConfig() + public function testGetJsonConfig(): void { $productId = 1; $amount = 10.50; @@ -416,10 +416,10 @@ private function getExpectedArray($productId, $amount, $priceQty, $percentage): /** * Retrieve mocks of \Magento\ConfigurableProduct\Model\Product\Type\Configurable object * - * @param \PHPUnit_Framework_MockObject_MockObject $productMock - * @return \PHPUnit_Framework_MockObject_MockObject + * @param \PHPUnit\Framework\MockObject\MockObject $productMock + * @return \PHPUnit\Framework\MockObject\MockObject */ - private function getProductTypeMock(\PHPUnit_Framework_MockObject_MockObject $productMock) + private function getProductTypeMock(\PHPUnit\Framework\MockObject\MockObject $productMock): \PHPUnit\Framework\MockObject\MockObject { $currencyMock = $this->getMockBuilder(\Magento\Directory\Model\Currency::class) ->disableOriginalConstructor() @@ -459,7 +459,7 @@ private function getProductTypeMock(\PHPUnit_Framework_MockObject_MockObject $pr * * @return void */ - protected function mockContextObject() + protected function mockContextObject(): void { $this->storeManager = $this->getMockBuilder(\Magento\Store\Model\StoreManagerInterface::class) ->getMockForAbstractClass(); @@ -476,9 +476,9 @@ protected function mockContextObject() * Retrieve mock of \Magento\Framework\Pricing\Amount\AmountInterface object * * @param float $amount - * @return \PHPUnit_Framework_MockObject_MockObject + * @return \Magento\Framework\Pricing\Amount\AmountInterface|\PHPUnit\Framework\MockObject\MockObject */ - protected function getAmountMock($amount): \PHPUnit_Framework_MockObject_MockObject + protected function getAmountMock($amount): \PHPUnit\Framework\MockObject\MockObject { $amountMock = $this->getMockBuilder(\Magento\Framework\Pricing\Amount\AmountInterface::class) ->setMethods(['getValue', 'getBaseAmount']) @@ -496,12 +496,12 @@ protected function getAmountMock($amount): \PHPUnit_Framework_MockObject_MockObj /** * Retrieve mock of \Magento\Catalog\Pricing\Price\TierPriceInterface object * - * @param \PHPUnit_Framework_MockObject_MockObject $amountMock + * @param \PHPUnit\Framework\MockObject\MockObject $amountMock * @param float $priceQty * @param int $percentage - * @return \PHPUnit_Framework_MockObject_MockObject + * @return \PHPUnit\Framework\MockObject\MockObject */ - protected function getTierPriceMock(\PHPUnit_Framework_MockObject_MockObject $amountMock, $priceQty, $percentage) + protected function getTierPriceMock(\PHPUnit_Framework_MockObject_MockObject $amountMock, $priceQty, $percentage): \PHPUnit\Framework\MockObject\MockObject { $tierPrice = [ 'price_qty' => $priceQty, diff --git a/app/code/Magento/ConfigurableProduct/Test/Unit/Model/Product/Type/Configurable/Variations/PricesTest.php b/app/code/Magento/ConfigurableProduct/Test/Unit/Model/Product/Type/Configurable/Variations/PricesTest.php index 1e8821217f2b1..c91c681d0458e 100644 --- a/app/code/Magento/ConfigurableProduct/Test/Unit/Model/Product/Type/Configurable/Variations/PricesTest.php +++ b/app/code/Magento/ConfigurableProduct/Test/Unit/Model/Product/Type/Configurable/Variations/PricesTest.php @@ -13,7 +13,7 @@ class PricesTest extends TestCase { /** - * @var \PHPUnit_Framework_MockObject_MockObject + * @var \PHPUnit\Framework\MockObject\MockObject */ private $localeFormatMock; @@ -22,7 +22,7 @@ class PricesTest extends TestCase */ private $model; - protected function setUp() + protected function setUp(): void { $this->localeFormatMock = $this->createMock(\Magento\Framework\Locale\Format::class); $this->model = new \Magento\ConfigurableProduct\Model\Product\Type\Configurable\Variations\Prices( @@ -30,7 +30,7 @@ protected function setUp() ); } - public function testGetFormattedPrices() + public function testGetFormattedPrices(): void { $expected = [ 'baseOldPrice' => [