Skip to content

Commit

Permalink
Fix phpcs issues that were false-positive
Browse files Browse the repository at this point in the history
  • Loading branch information
karyna-t committed Oct 15, 2021
1 parent 7cac36c commit 6950895
Show file tree
Hide file tree
Showing 126 changed files with 724 additions and 765 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -135,22 +135,20 @@ public function testModifyMeta(string $shipmentTypePath, string $dataScope): voi
->willReturn([]);
$this->arrayManagerMock->method('set')
->willReturn([]);

$metaArgument = [
$shipmentTypePath . BundlePanel::META_CONFIG_PATH,
[],
[
'dataScope' => $dataScope,
'validation' => [
'required-entry' => false
]
]
];
$this->arrayManagerMock
->method('merge')
->withConsecutive(
[], [], [], [], [], [], [], [], [], [], [], [],
[
$shipmentTypePath . BundlePanel::META_CONFIG_PATH,
[],
[
'dataScope' => $dataScope,
'validation' => [
'required-entry' => false
]
]
]

);
->withConsecutive([], [], [], [], [], [], [], [], [], [], [], [], $metaArgument);
$this->bundlePanelModel->modifyMeta($sourceMeta);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,8 @@ protected function setUp(): void
'delete',
'quoteInto',
'fetchAssoc'
])
]
)
->disableOriginalConstructor()
->getMock();
$this->select = $this->createMock(Select::class);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
class SaveHandlerTest extends TestCase
{
/**
* Magento\Framework\TestFramework\Unit\Helper\ObjectManager
* @var ObjectManager
*/
private $objectManager;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,8 @@ protected function setUp(): void
}

/**
* @return void
*/
* @return void
*/
public function testGetList(): void
{
$productSku = 'simple_product';
Expand All @@ -106,17 +106,17 @@ public function testGetList(): void
}

/**
* @return void
*/
* @return void
*/
public function testDelete(): void
{
$this->optionResourceMock->expects($this->once())->method('delete')->with($this->optionMock);
$this->assertTrue($this->optionRepository->delete($this->optionMock));
}

/**
* @return void
*/
* @return void
*/
public function testGetNonExistingOption(): void
{
$this->expectException('Magento\Framework\Exception\NoSuchEntityException');
Expand All @@ -136,8 +136,8 @@ public function testGetNonExistingOption(): void
}

/**
* @return void
*/
* @return void
*/
public function testGet(): void
{
$optionId = 1;
Expand All @@ -155,8 +155,8 @@ public function testGet(): void
}

/**
* @return void
*/
* @return void
*/
public function testDeleteByIdentifierNonExistingOption(): void
{
$this->expectException('Magento\Framework\Exception\NoSuchEntityException');
Expand All @@ -177,8 +177,8 @@ public function testDeleteByIdentifierNonExistingOption(): void
}

/**
* @return void
*/
* @return void
*/
public function testDeleteByIdentifier(): void
{
$optionId = 1;
Expand All @@ -200,8 +200,8 @@ public function testDeleteByIdentifier(): void
}

/**
* @return void
*/
* @return void
*/
public function testDeleteByIdentifierWhenCannotRemoveOption(): void
{
$this->expectException('Magento\Framework\Exception\CouldNotSaveException');
Expand All @@ -228,8 +228,8 @@ public function testDeleteByIdentifierWhenCannotRemoveOption(): void
}

/**
* @return void
*/
* @return void
*/
public function testSaveCouldNotSaveException(): void
{
$this->expectException('Magento\Framework\Exception\CouldNotSaveException');
Expand All @@ -239,8 +239,8 @@ public function testSaveCouldNotSaveException(): void
}

/**
* @return void
*/
* @return void
*/
public function testSaveNoSuchEntityException(): void
{
$this->expectException('Magento\Framework\Exception\NoSuchEntityException');
Expand All @@ -261,8 +261,8 @@ public function testSaveNoSuchEntityException(): void
}

/**
* @return void
*/
* @return void
*/
public function testSave(): void
{
$productSku = 'simple_product';
Expand Down Expand Up @@ -307,8 +307,8 @@ public function testSave(): void
}

/**
* @return void
*/
* @return void
*/
public function testSaveWhenOptionTypeWasChanged(): void
{
$productSku = 'simple_product';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,9 @@ class PriceTest extends TestCase
*/
protected $websiteMock;

/**
* @var ProductTierPriceExtensionFactory|MockObject
*/
private $tierPriceExtensionFactoryMock;

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,7 @@ public function testGetCompositeTypes(): void
public function testGetTypesByPriority(): void
{
$expected = [];
$options = [];
foreach ($this->_productTypes as $typeId => $type) {
$type['label'] = __($type['label']);
$options[$typeId] = $type;
Expand Down
Loading

0 comments on commit 6950895

Please sign in to comment.