Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PHPDoc #16215

Merged
Merged

PHPDoc #16215

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,9 @@ public function testGetIdentity($expectedSum, $cacheTypes)
$this->assertEquals($expectedSum, $this->_messageModel->getIdentity());
}

/**
* @return array
*/
public function getIdentityDataProvider()
{
$cacheTypeMock1 = $this->createPartialMock(\stdClass::class, ['getCacheType']);
Expand Down Expand Up @@ -95,6 +98,9 @@ public function testIsDisplayed($expected, $allowed, $cacheTypes)
$this->assertEquals($expected, $this->_messageModel->isDisplayed());
}

/**
* @return array
*/
public function isDisplayedDataProvider()
{
$cacheTypesMock = $this->createPartialMock(\stdClass::class, ['getCacheType']);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,9 @@ public function testIsDisplayed($expectedFirstRun, $data)
$this->assertEquals($expectedFirstRun, $model->isDisplayed());
}

/**
* @return array
*/
public function isDisplayedDataProvider()
{
return [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,9 @@ public function testIsDisplayed($expectedResult, $cached, $response)
$this->assertEquals($expectedResult, $this->_messageModel->isDisplayed());
}

/**
* @return array
*/
public function isDisplayedDataProvider()
{
return [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,9 @@ public function testIsValidAddMessagesCall($value, $hasEmptyColumns, $customerGr
$this->tierPrice->isValid($value);
}

/**
* @return array
*/
public function isValidResultFalseDataProvider()
{
return [
Expand Down Expand Up @@ -286,6 +289,9 @@ public function isValidResultFalseDataProvider()
];
}

/**
* @return array
*/
public function isValidAddMessagesCallDataProvider()
{
return [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,9 @@ public function testGetAllWebsitesValue()
$this->assertEquals($expectedResult, $result);
}

/**
* @return array
*/
public function isValidReturnDataProvider()
{
return [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,9 @@ public function testInit()
$this->validator->init(null);
}

/**
* @return array
*/
public function isValidDataProvider()
{
return [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -768,6 +768,9 @@ public function testSaveProductPrices($priceData, $oldSkus, $priceIn, $callNum)
$this->invokeMethod($this->advancedPricing, 'saveProductPrices', [$priceData, 'table']);
}

/**
* @return array
*/
public function saveProductPricesDataProvider()
{
return [
Expand Down Expand Up @@ -839,6 +842,9 @@ public function testDeleteProductTierPrices(
);
}

/**
* @return array
*/
public function deleteProductTierPricesDataProvider()
{
return [
Expand Down Expand Up @@ -921,6 +927,9 @@ public function testProcessCountExistingPrices(
$this->invokeMethod($this->advancedPricing, 'processCountExistingPrices', [$prices, 'table']);
}

/**
* @return array
*/
public function processCountExistingPricesDataProvider()
{
return [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,9 @@ public function testGetAllowedResourcesByUser()
);
}

/**
* @return AclRetriever
*/
protected function createAclRetriever()
{
$this->roleMock = $this->createPartialMock(\Magento\Authorization\Model\Role::class, ['getId', '__wakeup']);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@ public function testGenerateHash($merchantMd5, $merchantApiLogin, $amount, $amou
);
}

/**
* @return array
*/
public function generateHashDataProvider()
{
return [
Expand All @@ -57,6 +60,14 @@ public function generateHashDataProvider()
];
}

/**
* @param $merchantMd5
* @param $merchantApiLogin
* @param $amount
* @param $transactionId
*
* @return string
*/
protected function generateHash($merchantMd5, $merchantApiLogin, $amount, $transactionId)
{
return strtoupper(md5($merchantMd5 . $merchantApiLogin . $transactionId . $amount));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,9 @@ public function testProcessNotLoggedInUser($isIFrameParam, $isAjaxParam, $isForw
$this->assertEquals($expectedResult, $this->plugin->aroundDispatch($subject, $proceed, $request));
}

/**
* @return array
*/
public function processNotLoggedInUserDataProvider()
{
return [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,9 @@ public function testBeforeDispatchWhenMassactionPrepareKeyRequestExists($postDat
$this->plugin->beforeDispatch($this->subjectMock, $this->requestMock);
}

/**
* @return array
*/
public function beforeDispatchDataProvider()
{
return [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@

class ActionStub extends \Magento\Backend\App\Action
{
/**
* @return \Magento\Framework\App\ResponseInterface|\Magento\Framework\Controller\ResultInterface|void
*/
public function execute()
{
// Empty method stub for test
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,9 @@ public function testIsHostBackend($url, $host, $useCustomAdminUrl, $customAdminU
$this->assertEquals($this->model->isHostBackend(), $expectedValue);
}

/**
* @return array
*/
public function hostsDataProvider()
{
return [
Expand Down
3 changes: 3 additions & 0 deletions app/code/Magento/Backend/Test/Unit/App/ConfigTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,9 @@ public function testIsSetFlag($configPath, $configValue, $expectedResult)
$this->assertEquals($expectedResult, $this->model->isSetFlag($configPath));
}

/**
* @return array
*/
public function isSetFlagDataProvider()
{
return [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,9 @@ public function testRenderAnchorLevelIsNotOne($hasTarget)
);
}

/**
* @return array
*/
public function targetDataProvider()
{
return [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,9 @@ public function testIsInProductionMode($mode, $expected)
$this->assertEquals($expected, $this->additonalBlock->isInProductionMode());
}

/**
* @return array
*/
public function isInProductionModeDataProvider()
{
return [
Expand Down
3 changes: 3 additions & 0 deletions app/code/Magento/Backend/Test/Unit/Block/GlobalSearchTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,9 @@ public function testGetEntitiesToShow(array $results, int $expectedEntitiesQty)
$this->assertSame($expectedEntitiesQty, count($this->globalSearch->getEntitiesToShow()));
}

/**
* @return array
*/
public function getEntitiesToShowDataProvider()
{
return [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,9 @@ public function testIsItemActiveLevelNotZero()
);
}

/**
* @return array
*/
public function dataProvider()
{
return [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,9 @@ public function testGetAttributesHtml($data, $expect)
$this->assertRegExp($expect, $attributes);
}

/**
* @return array
*/
public function getAttributesHtmlDataProvider()
{
return [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,9 @@ public function testRender(array $rowData, $expectedResult)
$this->assertEquals($expectedResult, $this->_object->render(new \Magento\Framework\DataObject($rowData)));
}

/**
* @return array
*/
public function renderDataProvider()
{
return [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,9 @@ public function testRender(array $rowData, $expectedResult)
$this->assertEquals($expectedResult, $this->_object->render(new \Magento\Framework\DataObject($rowData)));
}

/**
* @return array
*/
public function renderDataProvider()
{
return [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,9 @@ public function testGetSortable($value)
$this->assertFalse($this->_block->getSortable());
}

/**
* @return array
*/
public function getSortableDataProvider()
{
return ['zero' => ['0'], 'false' => [false], 'null' => [null]];
Expand Down Expand Up @@ -374,6 +377,9 @@ public function testColumnIsGrouped($groupedData, $expected)
$this->assertEquals($expected, $block->isGrouped());
}

/**
* @return array
*/
public function columnGroupedDataProvider()
{
return [[[], false], [['grouped' => 0], false], [['grouped' => 1], true]];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,9 @@ public function testGetGridIdsJsonWithUseSelectAll(array $items, $result)
$this->assertEquals($result, $this->_block->getGridIdsJson());
}

/**
* @return array
*/
public function dataProviderGetGridIdsJsonWithUseSelectAll()
{
return [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -243,6 +243,9 @@ public function testSelected($param, $expectedJson, $expected)
$this->assertEquals($expected, $this->_block->getSelected());
}

/**
* @return array
*/
public function selectedDataProvider()
{
return [
Expand Down
3 changes: 3 additions & 0 deletions app/code/Magento/Backend/Test/Unit/Block/Widget/TabTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,9 @@ public function testGetters($method, $field, $value, $expected)
$this->assertEquals($expected, $object->{$method}());
}

/**
* @return array
*/
public function dataProvider()
{
return [
Expand Down
3 changes: 3 additions & 0 deletions app/code/Magento/Backend/Test/Unit/Helper/DataTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,9 @@ public function testPrepareFilterStringValues(array $inputString, array $expecte
$this->assertEquals($expected, $actual);
}

/**
* @return array
*/
public function getPrepareFilterStringValuesDataProvider()
{
return [
Expand Down
9 changes: 9 additions & 0 deletions app/code/Magento/Backend/Test/Unit/Model/Auth/SessionTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,9 @@ public function testRefreshAcl($isUserPassedViaParams)
$this->assertSame($aclMock, $this->session->getAcl());
}

/**
* @return array
*/
public function refreshAclDataProvider()
{
return [
Expand Down Expand Up @@ -234,6 +237,9 @@ public function testIsAllowed($isUserDefined, $isAclDefined, $isAllowed, $expect
$this->assertEquals($expectedResult, $this->session->isAllowed('resource'));
}

/**
* @return array
*/
public function isAllowedDataProvider()
{
return [
Expand All @@ -254,6 +260,9 @@ public function testFirstPageAfterLogin($isFirstPageAfterLogin)
$this->assertEquals($isFirstPageAfterLogin, $this->session->isFirstPageAfterLogin());
}

/**
* @return array
*/
public function firstPageAfterLoginDataProvider()
{
return [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@ public function testBeforeSave($value, $errorMessage = null)
$this->assertEquals($model, $object);
}

/**
* @return array
*/
public function adminSessionLifetimeDataProvider()
{
return [
Expand Down
3 changes: 3 additions & 0 deletions app/code/Magento/Backend/Test/Unit/Model/Menu/ConfigTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,9 @@ public function testGetMenuExceptionLogged($expectedException)
$this->model->getMenu();
}

/**
* @return array
*/
public function getMenuExceptionLoggedDataProvider()
{
return [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,9 @@ public function testValidateWithMissingRequiredParamThrowsException($requiredPar
}
}

/**
* @return array
*/
public function requiredParamsProvider()
{
return [['id'], ['title'], ['resource']];
Expand All @@ -102,6 +105,9 @@ public function testValidateWithNonValidPrimitivesThrowsException($param, $inval
}
}

/**
* @return array
*/
public function invalidParamsProvider()
{
return [
Expand Down
Loading