Skip to content

Commit

Permalink
[Forwardport] PHPDoc
Browse files Browse the repository at this point in the history
  • Loading branch information
lfluvisotto committed Jun 23, 2018
1 parent 92b9a39 commit 05c9e0e
Show file tree
Hide file tree
Showing 621 changed files with 3,135 additions and 1 deletion.
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 @@ -163,6 +163,9 @@ public function testValidateNoOptions()
$this->assertEquals($expectedResult, $this->model->validate($options, $this->deploymentConfigMock));
}

/**
* @return array
*/
public function getCreateConfigDataProvider()
{
return [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,9 @@ public function testConvertBody($unserializedResult, $expected)
$this->assertEquals($expected, $this->converter->fromBody('body'));
}

/**
* @return array
*/
public function convertBodyDataProvider()
{
return [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,9 @@ public function testGetOperationsCountByBulkIdAndStatus()
$this->assertEquals($size, $this->model->getOperationsCountByBulkIdAndStatus($bulkUuid, $status));
}

/**
* @return array
*/
public function getFailedOperationsByBulkIdDataProvider()
{
return [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,9 @@ public function testEntityToDatabase($identifier, $result)
$this->assertEquals($result, $this->model->entityToDatabase($entityType, $data));
}

/**
* @return array
*/
public function entityToDatabaseDataProvider()
{
return [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,9 @@ public function testAfterTo($operationDetails)
$this->assertEquals(2, $result2['totalRecords']);
}

/**
* @return array
*/
public function afterToDataProvider()
{
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,13 @@ 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->additionalBlock->isInProductionMode());
}

/**
* @return array
*/
public function isInProductionModeDataProvider()
{
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
Loading

0 comments on commit 05c9e0e

Please sign in to comment.