assertEquals($select, $result);
}
+ /**
+ * @return array
+ */
public function matchProvider()
{
return [[true], [false]];
diff --git a/lib/internal/Magento/Framework/DB/Test/Unit/Select/ColumnsRendererTest.php b/lib/internal/Magento/Framework/DB/Test/Unit/Select/ColumnsRendererTest.php
index ad7883283b916..8a3e13aa71510 100644
--- a/lib/internal/Magento/Framework/DB/Test/Unit/Select/ColumnsRendererTest.php
+++ b/lib/internal/Magento/Framework/DB/Test/Unit/Select/ColumnsRendererTest.php
@@ -77,6 +77,9 @@ public function testRender($columns, $sql, $expectedResult)
$this->assertEquals($expectedResult, $this->model->render($this->selectMock, $sql));
}
+ /**
+ * @return array
+ */
public function renderDataProvider()
{
return [
diff --git a/lib/internal/Magento/Framework/Data/Test/Unit/Argument/Interpreter/ArrayTypeTest.php b/lib/internal/Magento/Framework/Data/Test/Unit/Argument/Interpreter/ArrayTypeTest.php
index 02ce7494fba35..0f82b17b1ba5c 100644
--- a/lib/internal/Magento/Framework/Data/Test/Unit/Argument/Interpreter/ArrayTypeTest.php
+++ b/lib/internal/Magento/Framework/Data/Test/Unit/Argument/Interpreter/ArrayTypeTest.php
@@ -38,6 +38,9 @@ public function testEvaluateException($inputData)
$this->_model->evaluate($inputData);
}
+ /**
+ * @return array
+ */
public function evaluateExceptionDataProvider()
{
return [
@@ -62,6 +65,9 @@ public function testEvaluate(array $input, array $expected)
$this->assertSame($expected, $actual);
}
+ /**
+ * @return array
+ */
public function evaluateDataProvider()
{
return [
diff --git a/lib/internal/Magento/Framework/Data/Test/Unit/Argument/Interpreter/CompositeTest.php b/lib/internal/Magento/Framework/Data/Test/Unit/Argument/Interpreter/CompositeTest.php
index ce6f761ea0a58..ef72ff1b97608 100644
--- a/lib/internal/Magento/Framework/Data/Test/Unit/Argument/Interpreter/CompositeTest.php
+++ b/lib/internal/Magento/Framework/Data/Test/Unit/Argument/Interpreter/CompositeTest.php
@@ -59,6 +59,9 @@ public function testEvaluateWrongDiscriminator($input, $expectedExceptionMessage
$this->_model->evaluate($input);
}
+ /**
+ * @return array
+ */
public function evaluateWrongDiscriminatorDataProvider()
{
return [
diff --git a/lib/internal/Magento/Framework/Data/Test/Unit/Argument/Interpreter/NumberTest.php b/lib/internal/Magento/Framework/Data/Test/Unit/Argument/Interpreter/NumberTest.php
index 6e9fe804508dc..d2138c2a17248 100644
--- a/lib/internal/Magento/Framework/Data/Test/Unit/Argument/Interpreter/NumberTest.php
+++ b/lib/internal/Magento/Framework/Data/Test/Unit/Argument/Interpreter/NumberTest.php
@@ -30,6 +30,9 @@ public function testEvaluateException($input)
$this->_model->evaluate($input);
}
+ /**
+ * @return array
+ */
public function evaluateExceptionDataProvider()
{
return ['no value' => [[]], 'non-numeric value' => [['value' => 'non-numeric']]];
@@ -47,6 +50,9 @@ public function testEvaluate($input, $expected)
$this->assertSame($expected, $actual);
}
+ /**
+ * @return array
+ */
public function evaluateDataProvider()
{
return [
diff --git a/lib/internal/Magento/Framework/Data/Test/Unit/Collection/DbTest.php b/lib/internal/Magento/Framework/Data/Test/Unit/Collection/DbTest.php
index 6f14e7c838bdf..ad588c9f9b0fa 100644
--- a/lib/internal/Magento/Framework/Data/Test/Unit/Collection/DbTest.php
+++ b/lib/internal/Magento/Framework/Data/Test/Unit/Collection/DbTest.php
@@ -327,6 +327,9 @@ public function testPrintLogQueryPrinting($printQuery, $printFlag, $query, $expe
$this->collection->printLogQuery($printQuery, false, $query);
}
+ /**
+ * @return array
+ */
public function printLogQueryPrintingDataProvider()
{
return [
@@ -350,6 +353,9 @@ public function testPrintLogQueryLogging($logQuery, $logFlag, $expectedCalls)
$this->collection->printLogQuery(false, $logQuery, 'some_query');
}
+ /**
+ * @return array
+ */
public function printLogQueryLoggingDataProvider()
{
return [
@@ -541,6 +547,9 @@ public function testDistinct($flag, $expectedFlag)
$this->collection->distinct($flag);
}
+ /**
+ * @return array
+ */
public function distinctDataProvider()
{
return [
diff --git a/lib/internal/Magento/Framework/Data/Test/Unit/Form/Element/DateTest.php b/lib/internal/Magento/Framework/Data/Test/Unit/Form/Element/DateTest.php
index c751e59f0ba8b..cab88f04749c3 100644
--- a/lib/internal/Magento/Framework/Data/Test/Unit/Form/Element/DateTest.php
+++ b/lib/internal/Magento/Framework/Data/Test/Unit/Form/Element/DateTest.php
@@ -92,6 +92,9 @@ public function testGetElementHtmlDateFormat($fieldName)
$this->model->getElementHtml();
}
+ /**
+ * @return array
+ */
public function providerGetElementHtmlDateFormat()
{
return [
@@ -100,6 +103,10 @@ public function providerGetElementHtmlDateFormat()
];
}
+ /**
+ * @param $exactly
+ * @return mixed
+ */
protected function getFormMock($exactly)
{
$functions = ['getFieldNameSuffix', 'getHtmlIdPrefix', 'getHtmlIdSuffix'];
diff --git a/lib/internal/Magento/Framework/Data/Test/Unit/Form/FormKey/ValidatorTest.php b/lib/internal/Magento/Framework/Data/Test/Unit/Form/FormKey/ValidatorTest.php
index 9fe0cf548a6e9..7f56e73a2f400 100644
--- a/lib/internal/Magento/Framework/Data/Test/Unit/Form/FormKey/ValidatorTest.php
+++ b/lib/internal/Magento/Framework/Data/Test/Unit/Form/FormKey/ValidatorTest.php
@@ -56,6 +56,9 @@ public function testValidate($formKey, $expected)
$this->assertEquals($expected, $this->_model->validate($this->_requestMock));
}
+ /**
+ * @return array
+ */
public function validateDataProvider()
{
return [
diff --git a/lib/internal/Magento/Framework/Encryption/Test/Unit/CryptTest.php b/lib/internal/Magento/Framework/Encryption/Test/Unit/CryptTest.php
index b2e7e25043d82..6a3d55a6be705 100644
--- a/lib/internal/Magento/Framework/Encryption/Test/Unit/CryptTest.php
+++ b/lib/internal/Magento/Framework/Encryption/Test/Unit/CryptTest.php
@@ -30,6 +30,10 @@ protected function setUp()
$this->_key = substr(__CLASS__, -32, 32);
}
+ /**
+ * @param $length
+ * @return bool|string
+ */
protected function _getRandomString($length)
{
$result = '';
@@ -64,18 +68,31 @@ protected function _requireCipherInfo()
}
}
+ /**
+ * @param $cipherName
+ * @param $modeName
+ * @return mixed
+ */
protected function _getKeySize($cipherName, $modeName)
{
$this->_requireCipherInfo();
return self::$_cipherInfo[$cipherName][$modeName]['key_size'];
}
+ /**
+ * @param $cipherName
+ * @param $modeName
+ * @return mixed
+ */
protected function _getInitVectorSize($cipherName, $modeName)
{
$this->_requireCipherInfo();
return self::$_cipherInfo[$cipherName][$modeName]['iv_size'];
}
+ /**
+ * @return array
+ */
public function getCipherModeCombinations()
{
$result = [];
@@ -102,6 +119,9 @@ public function testConstructor($cipher, $mode)
$this->assertEquals($initVector, $crypt->getInitVector());
}
+ /**
+ * @return array
+ */
public function getConstructorExceptionData()
{
$result = [];
@@ -137,6 +157,9 @@ public function testConstructorDefaults()
$this->assertEquals($cryptExpected->getInitVector(), $cryptActual->getInitVector());
}
+ /**
+ * @return mixed
+ */
public function getCryptData()
{
$fixturesFilename = __DIR__ . '/Crypt/_files/_crypt_fixtures.php';
diff --git a/lib/internal/Magento/Framework/Encryption/Test/Unit/EncryptorTest.php b/lib/internal/Magento/Framework/Encryption/Test/Unit/EncryptorTest.php
index 4fdbd558dafd3..892f8902fd432 100644
--- a/lib/internal/Magento/Framework/Encryption/Test/Unit/EncryptorTest.php
+++ b/lib/internal/Magento/Framework/Encryption/Test/Unit/EncryptorTest.php
@@ -86,6 +86,9 @@ public function testValidateHash($password, $hash, $expected)
$this->assertEquals($expected, $actual);
}
+ /**
+ * @return array
+ */
public function validateHashDataProvider()
{
return [
@@ -112,6 +115,9 @@ public function testEncryptWithEmptyKey($key)
$this->assertEquals($value, $model->encrypt($value));
}
+ /**
+ * @return array
+ */
public function encryptWithEmptyKeyDataProvider()
{
return [[null], [0], [''], ['0']];
@@ -134,6 +140,9 @@ public function testDecryptWithEmptyKey($key)
$this->assertEquals('', $model->decrypt($value));
}
+ /**
+ * @return array
+ */
public function decryptWithEmptyKeyDataProvider()
{
return [[null], [0], [''], ['0']];
@@ -208,6 +217,9 @@ public function testValidateKey()
$this->assertEquals($crypt->decrypt($expectedEncryptedData), $actual->decrypt($actualEncryptedData));
}
+ /**
+ * @return array
+ */
public function testUseSpecifiedHashingAlgoDataProvider()
{
return [
diff --git a/lib/internal/Magento/Framework/Encryption/Test/Unit/Helper/SecurityTest.php b/lib/internal/Magento/Framework/Encryption/Test/Unit/Helper/SecurityTest.php
index f4403c5c97797..875d8aff40ef2 100644
--- a/lib/internal/Magento/Framework/Encryption/Test/Unit/Helper/SecurityTest.php
+++ b/lib/internal/Magento/Framework/Encryption/Test/Unit/Helper/SecurityTest.php
@@ -31,6 +31,9 @@ public function testCompareStrings($expected, $actual, $result)
$this->assertEquals($result, Security::compareStrings($expected, $actual));
}
+ /**
+ * @return array
+ */
public function dataProvider()
{
return [
diff --git a/lib/internal/Magento/Framework/EntityManager/Test/Unit/CustomAttributesMapperTest.php b/lib/internal/Magento/Framework/EntityManager/Test/Unit/CustomAttributesMapperTest.php
index a404811f9e4db..108af4de2f7c8 100644
--- a/lib/internal/Magento/Framework/EntityManager/Test/Unit/CustomAttributesMapperTest.php
+++ b/lib/internal/Magento/Framework/EntityManager/Test/Unit/CustomAttributesMapperTest.php
@@ -197,6 +197,9 @@ public function testDatabaseToEntity()
$this->assertEquals($expected, $actual);
}
+ /**
+ * @return array
+ */
private function getAttributes()
{
/* Attribute with the code we want to copy */
diff --git a/lib/internal/Magento/Framework/Event/Config/SchemaLocator.php b/lib/internal/Magento/Framework/Event/Config/SchemaLocator.php
index 82f54b7ebc3e6..1a646be88b84c 100644
--- a/lib/internal/Magento/Framework/Event/Config/SchemaLocator.php
+++ b/lib/internal/Magento/Framework/Event/Config/SchemaLocator.php
@@ -12,6 +12,10 @@ class SchemaLocator implements \Magento\Framework\Config\SchemaLocatorInterface
/** @var \Magento\Framework\Config\Dom\UrnResolver */
protected $urnResolver;
+ /**
+ * SchemaLocator constructor.
+ * @param \Magento\Framework\Config\Dom\UrnResolver $urnResolver
+ */
public function __construct(\Magento\Framework\Config\Dom\UrnResolver $urnResolver)
{
$this->urnResolver = $urnResolver;
diff --git a/lib/internal/Magento/Framework/Event/Test/Unit/Observer/CollectionTest.php b/lib/internal/Magento/Framework/Event/Test/Unit/Observer/CollectionTest.php
index b3a6a4a429453..4b774b544cf55 100644
--- a/lib/internal/Magento/Framework/Event/Test/Unit/Observer/CollectionTest.php
+++ b/lib/internal/Magento/Framework/Event/Test/Unit/Observer/CollectionTest.php
@@ -81,6 +81,9 @@ public function testGetObserverByName($name)
$this->assertEquals($observer, $this->observerCollection->getObserverByName($name));
}
+ /**
+ * @return array
+ */
public function observerNameProvider()
{
return [
diff --git a/lib/internal/Magento/Framework/Event/Test/Unit/Observer/CronTest.php b/lib/internal/Magento/Framework/Event/Test/Unit/Observer/CronTest.php
index 2e505c7753399..1c2a451cea91f 100644
--- a/lib/internal/Magento/Framework/Event/Test/Unit/Observer/CronTest.php
+++ b/lib/internal/Magento/Framework/Event/Test/Unit/Observer/CronTest.php
@@ -37,6 +37,9 @@ public function testGetNumeric($value, $expectedResult)
$this->assertEquals($expectedResult, $this->cron->getNumeric($value));
}
+ /**
+ * @return array
+ */
public function numericValueProvider()
{
return [
@@ -78,6 +81,9 @@ public function testMatchCronExpression($expression, $number, $expectedResult)
$this->assertEquals($expectedResult, $this->cron->matchCronExpression($expression, $number));
}
+ /**
+ * @return array
+ */
public function matchCronExpressionProvider()
{
return [
@@ -107,6 +113,9 @@ public function testIsValidFor($time, $expression, $expectedResult)
$this->assertEquals($expectedResult, $this->cron->isValidFor($eventMock));
}
+ /**
+ * @return array
+ */
public function isValidForProvider()
{
return [
diff --git a/lib/internal/Magento/Framework/Event/Test/Unit/Observer/RegexTest.php b/lib/internal/Magento/Framework/Event/Test/Unit/Observer/RegexTest.php
index df31d4ae71cd1..0c9b09996178a 100644
--- a/lib/internal/Magento/Framework/Event/Test/Unit/Observer/RegexTest.php
+++ b/lib/internal/Magento/Framework/Event/Test/Unit/Observer/RegexTest.php
@@ -44,6 +44,9 @@ public function testIsValidFor($pattern, $name, $expectedResult)
$this->assertEquals($expectedResult, $this->regex->isValidFor($eventMock));
}
+ /**
+ * @return array
+ */
public function isValidForProvider()
{
return [
diff --git a/lib/internal/Magento/Framework/Filesystem/Test/Unit/Driver/FileTest.php b/lib/internal/Magento/Framework/Filesystem/Test/Unit/Driver/FileTest.php
index 89e58f5728dc0..ca600e7ebb713 100644
--- a/lib/internal/Magento/Framework/Filesystem/Test/Unit/Driver/FileTest.php
+++ b/lib/internal/Magento/Framework/Filesystem/Test/Unit/Driver/FileTest.php
@@ -30,7 +30,10 @@ public function testGetAbsolutePath($basePath, $path, $expected)
$file = new File();
$this->assertEquals($expected, $file->getAbsolutePath($basePath, $path));
}
-
+
+ /**
+ * @return array
+ */
public function dataProviderForTestGetAbsolutePath()
{
return [
@@ -50,6 +53,9 @@ public function testGetRelativePath($basePath, $path, $expected)
$this->assertEquals($expected, $file->getRelativePath($basePath, $path));
}
+ /**
+ * @return array
+ */
public function dataProviderForTestGetRelativePath()
{
return [
diff --git a/lib/internal/Magento/Framework/Filesystem/Test/Unit/Driver/HttpTest.php b/lib/internal/Magento/Framework/Filesystem/Test/Unit/Driver/HttpTest.php
index 7e342fea6ff0c..d0fb24f7b748d 100644
--- a/lib/internal/Magento/Framework/Filesystem/Test/Unit/Driver/HttpTest.php
+++ b/lib/internal/Magento/Framework/Filesystem/Test/Unit/Driver/HttpTest.php
@@ -40,6 +40,9 @@ public function testIsExists($status, $result)
$this->assertEquals($result, (new Http())->isExists(''));
}
+ /**
+ * @return array
+ */
public function dataProviderForTestIsExists()
{
return [['200 OK', true], ['404 Not Found', false]];
@@ -54,6 +57,9 @@ public function testStat($headers, $result)
$this->assertEquals($result, (new Http())->stat(''));
}
+ /**
+ * @return array
+ */
public function dataProviderForTestStat()
{
$headers1 = [
diff --git a/lib/internal/Magento/Framework/Filesystem/Test/Unit/File/ExcludeFilterTest.php b/lib/internal/Magento/Framework/Filesystem/Test/Unit/File/ExcludeFilterTest.php
index 9dd2f09a60d84..aaf61637d5fc5 100644
--- a/lib/internal/Magento/Framework/Filesystem/Test/Unit/File/ExcludeFilterTest.php
+++ b/lib/internal/Magento/Framework/Filesystem/Test/Unit/File/ExcludeFilterTest.php
@@ -39,6 +39,9 @@ public function testExclusion()
$this->assertTrue(!in_array(BP . '/var/session/', $result), 'Filtered path should not be in array');
}
+ /**
+ * @return \Generator
+ */
private function getFilesIterator ()
{
$files = [
diff --git a/lib/internal/Magento/Framework/Filter/Test/Unit/Input/MaliciousCodeTest.php b/lib/internal/Magento/Framework/Filter/Test/Unit/Input/MaliciousCodeTest.php
index e79e07b89752e..69ff285a2b3fb 100644
--- a/lib/internal/Magento/Framework/Filter/Test/Unit/Input/MaliciousCodeTest.php
+++ b/lib/internal/Magento/Framework/Filter/Test/Unit/Input/MaliciousCodeTest.php
@@ -33,6 +33,9 @@ public function testFilter($input, $expectedOutput)
);
}
+ /**
+ * @return array
+ */
public function filterDataProvider()
{
return [
diff --git a/lib/internal/Magento/Framework/Filter/Test/Unit/Template/Tokenizer/ParameterTest.php b/lib/internal/Magento/Framework/Filter/Test/Unit/Template/Tokenizer/ParameterTest.php
index 7a44bf7cb4ef6..47e815ae4a719 100644
--- a/lib/internal/Magento/Framework/Filter/Test/Unit/Template/Tokenizer/ParameterTest.php
+++ b/lib/internal/Magento/Framework/Filter/Test/Unit/Template/Tokenizer/ParameterTest.php
@@ -41,6 +41,9 @@ public function testGetValue($string, $expectedValue)
$this->assertEquals($expectedValue, $this->_filter->getValue());
}
+ /**
+ * @return array
+ */
public function sampleTokenizeStringProvider()
{
return [
@@ -51,6 +54,9 @@ public function sampleTokenizeStringProvider()
];
}
+ /**
+ * @return array
+ */
public function sampleGetValueStringProvider()
{
return [
diff --git a/lib/internal/Magento/Framework/Filter/Test/Unit/Template/Tokenizer/VariableTest.php b/lib/internal/Magento/Framework/Filter/Test/Unit/Template/Tokenizer/VariableTest.php
index 6c3e1edd5371e..19d3d0556b8e3 100644
--- a/lib/internal/Magento/Framework/Filter/Test/Unit/Template/Tokenizer/VariableTest.php
+++ b/lib/internal/Magento/Framework/Filter/Test/Unit/Template/Tokenizer/VariableTest.php
@@ -30,6 +30,9 @@ public function testTokenize($string, $expectedValue)
$this->assertEquals($expectedValue, $this->_filter->tokenize());
}
+ /**
+ * @return array
+ */
public function sampleTokenizeStringProvider()
{
return [
diff --git a/lib/internal/Magento/Framework/Filter/Test/Unit/TemplateTest.php b/lib/internal/Magento/Framework/Filter/Test/Unit/TemplateTest.php
index ad47b4122ad67..a305fb6309b15 100644
--- a/lib/internal/Magento/Framework/Filter/Test/Unit/TemplateTest.php
+++ b/lib/internal/Magento/Framework/Filter/Test/Unit/TemplateTest.php
@@ -138,6 +138,9 @@ public function testVarDirective($construction, $variables, $expectedResult)
$this->assertEquals($expectedResult, $this->templateFilter->filter($construction));
}
+ /**
+ * @return array
+ */
public function varDirectiveDataProvider()
{
/* @var $stub \Magento\Framework\DataObject|\PHPUnit_Framework_MockObject_MockObject */
diff --git a/lib/internal/Magento/Framework/HTTP/Test/Unit/Adapter/CurlTest.php b/lib/internal/Magento/Framework/HTTP/Test/Unit/Adapter/CurlTest.php
index b839254e07035..34c0c4069a241 100644
--- a/lib/internal/Magento/Framework/HTTP/Test/Unit/Adapter/CurlTest.php
+++ b/lib/internal/Magento/Framework/HTTP/Test/Unit/Adapter/CurlTest.php
@@ -38,6 +38,9 @@ public function testRead($response)
$this->assertEquals(file_get_contents(__DIR__ . '/_files/curl_response_expected.txt'), $this->model->read());
}
+ /**
+ * @return array
+ */
public function readDataProvider()
{
return [
diff --git a/lib/internal/Magento/Framework/HTTP/Test/Unit/PhpEnvironment/RequestTest.php b/lib/internal/Magento/Framework/HTTP/Test/Unit/PhpEnvironment/RequestTest.php
index be65479f5503f..e553f0e041fa8 100644
--- a/lib/internal/Magento/Framework/HTTP/Test/Unit/PhpEnvironment/RequestTest.php
+++ b/lib/internal/Magento/Framework/HTTP/Test/Unit/PhpEnvironment/RequestTest.php
@@ -50,6 +50,10 @@ public function tearDown()
$_SERVER = $this->serverArray;
}
+ /**
+ * @param null $uri
+ * @return Request
+ */
private function getModel($uri = null)
{
return new Request($this->cookieReader, $this->converter, $uri);
@@ -213,7 +217,6 @@ public function testGetAliasWhenAliasAreEmpty()
$this->assertNull($this->model->getAlias(''));
}
-
public function testGetCookie()
{
$key = "cookieName";
@@ -227,7 +230,6 @@ public function testGetCookie()
$this->getModel()->getCookie($key, $default);
}
-
public function testGetCookieDefault()
{
$key = "cookieName";
diff --git a/lib/internal/Magento/Framework/Image/Test/Unit/Adapter/AbstractTest.php b/lib/internal/Magento/Framework/Image/Test/Unit/Adapter/AbstractTest.php
index 8e4fc4f389d1d..1dcf076767235 100644
--- a/lib/internal/Magento/Framework/Image/Test/Unit/Adapter/AbstractTest.php
+++ b/lib/internal/Magento/Framework/Image/Test/Unit/Adapter/AbstractTest.php
@@ -54,7 +54,7 @@ protected function setUp()
)->will(
$this->returnValue($this->directoryWriteMock)
);
- $this->loggerMock = $this->getMockBuilder( 'Psr\Log\LoggerInterface')->getMock();
+ $this->loggerMock = $this->getMockBuilder('Psr\Log\LoggerInterface')->getMock();
$this->_model = $this->getMockForAbstractClass(
'Magento\Framework\Image\Adapter\AbstractAdapter',
@@ -120,6 +120,9 @@ public function testPrepareDestination($destination, $newName, $expectedResult)
$this->assertEquals($expectedResult, $result);
}
+ /**
+ * @return array
+ */
public function prepareDestinationDataProvider()
{
return [
diff --git a/lib/internal/Magento/Framework/Image/Test/Unit/Adapter/Gd2Test.php b/lib/internal/Magento/Framework/Image/Test/Unit/Adapter/Gd2Test.php
index d142ac98a4201..e64c277a7276a 100644
--- a/lib/internal/Magento/Framework/Image/Test/Unit/Adapter/Gd2Test.php
+++ b/lib/internal/Magento/Framework/Image/Test/Unit/Adapter/Gd2Test.php
@@ -73,6 +73,9 @@ public function testOpen($fileData, $exception, $limit)
$this->adapter->open('file');
}
+ /**
+ * @return array
+ */
public function filesProvider()
{
$smallFile = [
diff --git a/lib/internal/Magento/Framework/Indexer/Config/SchemaLocator.php b/lib/internal/Magento/Framework/Indexer/Config/SchemaLocator.php
index e91d5e6bc2f10..6f338256b8c3e 100644
--- a/lib/internal/Magento/Framework/Indexer/Config/SchemaLocator.php
+++ b/lib/internal/Magento/Framework/Indexer/Config/SchemaLocator.php
@@ -12,6 +12,10 @@ class SchemaLocator implements SchemaLocatorInterface
/** @var \Magento\Framework\Config\Dom\UrnResolver */
protected $urnResolver;
+ /**
+ * SchemaLocator constructor.
+ * @param \Magento\Framework\Config\Dom\UrnResolver $urnResolver
+ */
public function __construct(\Magento\Framework\Config\Dom\UrnResolver $urnResolver)
{
$this->urnResolver = $urnResolver;
diff --git a/lib/internal/Magento/Framework/Indexer/Test/Unit/IndexStructureTest.php b/lib/internal/Magento/Framework/Indexer/Test/Unit/IndexStructureTest.php
index 6dfcf19604a79..e55afd8a43dc0 100644
--- a/lib/internal/Magento/Framework/Indexer/Test/Unit/IndexStructureTest.php
+++ b/lib/internal/Magento/Framework/Indexer/Test/Unit/IndexStructureTest.php
@@ -182,6 +182,12 @@ private function createDimensionMock($name, $value)
return $dimension;
}
+ /**
+ * @param $callNumber
+ * @param $tableName
+ * @param $isTableExist
+ * @return mixed
+ */
private function mockDropTable($callNumber, $tableName, $isTableExist)
{
$this->connectionInterface->expects($this->at($callNumber++))
@@ -197,6 +203,11 @@ private function mockDropTable($callNumber, $tableName, $isTableExist)
return $callNumber;
}
+ /**
+ * @param $callNumber
+ * @param $tableName
+ * @return mixed
+ */
private function mockFlatTable($callNumber, $tableName)
{
$table = $this->getMockBuilder('\Magento\Framework\DB\Ddl\Table')
@@ -219,6 +230,11 @@ private function mockFlatTable($callNumber, $tableName)
return $callNumber;
}
+ /**
+ * @param $callNumber
+ * @param $tableName
+ * @return mixed
+ */
private function mockFulltextTable($callNumber, $tableName)
{
$table = $this->getMockBuilder('\Magento\Framework\DB\Ddl\Table')
diff --git a/lib/internal/Magento/Framework/Interception/Test/Unit/Config/ConfigTest.php b/lib/internal/Magento/Framework/Interception/Test/Unit/Config/ConfigTest.php
index 88c510d797845..0bd02f49b66be 100644
--- a/lib/internal/Magento/Framework/Interception/Test/Unit/Config/ConfigTest.php
+++ b/lib/internal/Magento/Framework/Interception/Test/Unit/Config/ConfigTest.php
@@ -178,6 +178,9 @@ public function testHasPluginsWhenDataIsCached($expectedResult, $type)
$this->assertEquals($expectedResult, $model->hasPlugins($type));
}
+ /**
+ * @return array
+ */
public function hasPluginsDataProvider()
{
return [
diff --git a/lib/internal/Magento/Framework/Math/Test/Unit/RandomTest.php b/lib/internal/Magento/Framework/Math/Test/Unit/RandomTest.php
index 6b4b574c5a866..e7e0140c70839 100644
--- a/lib/internal/Magento/Framework/Math/Test/Unit/RandomTest.php
+++ b/lib/internal/Magento/Framework/Math/Test/Unit/RandomTest.php
@@ -26,6 +26,9 @@ public function testGetRandomString($length, $chars = null)
}
}
+ /**
+ * @return array
+ */
public function getRandomStringDataProvider()
{
return [
@@ -77,6 +80,9 @@ public function testGetRandomNumber($min, $max)
$this->assertGreaterThanOrEqual($min, $number);
}
+ /**
+ * @return array
+ */
public function testGetRandomNumberProvider()
{
return [
diff --git a/lib/internal/Magento/Framework/Message/Test/Unit/ManagerTest.php b/lib/internal/Magento/Framework/Message/Test/Unit/ManagerTest.php
index d876207c3430c..61e95ec3a1508 100644
--- a/lib/internal/Magento/Framework/Message/Test/Unit/ManagerTest.php
+++ b/lib/internal/Magento/Framework/Message/Test/Unit/ManagerTest.php
@@ -247,6 +247,9 @@ public function testAddMessage($type, $methodName)
$this->assertTrue($this->model->hasMessages());
}
+ /**
+ * @return array
+ */
public function addMessageDataProvider()
{
return [
@@ -277,6 +280,9 @@ public function testAddUniqueMessagesWhenMessagesImplementMessageInterface($mess
$this->model->addUniqueMessages([$messages]);
}
+ /**
+ * @return array
+ */
public function addUniqueMessagesWhenMessagesImplementMessageInterfaceDataProvider()
{
return [
@@ -310,6 +316,9 @@ public function testAddUniqueMessages($messages)
$this->model->addUniqueMessages($messages);
}
+ /**
+ * @return array
+ */
public function addUniqueMessagesDataProvider()
{
return [
diff --git a/lib/internal/Magento/Framework/Model/Test/Unit/ResourceModel/Db/AbstractDbTest.php b/lib/internal/Magento/Framework/Model/Test/Unit/ResourceModel/Db/AbstractDbTest.php
index ba35fa1af7496..aaafe0005b8ec 100644
--- a/lib/internal/Magento/Framework/Model/Test/Unit/ResourceModel/Db/AbstractDbTest.php
+++ b/lib/internal/Magento/Framework/Model/Test/Unit/ResourceModel/Db/AbstractDbTest.php
@@ -165,6 +165,9 @@ public function testGetMainTable($tableName, $expectedResult)
$this->assertEquals($expectedResult, $this->_model->getMainTable());
}
+ /**
+ * @return array
+ */
public function getTableDataProvider()
{
return [
@@ -216,6 +219,9 @@ public function testGetChecksum($checksum, $expected)
$this->assertEquals($expected, $this->_model->getChecksum($checksum));
}
+ /**
+ * @return array
+ */
public function getChecksumProvider()
{
return [
@@ -401,6 +407,9 @@ public function testGetDataChanged($getOriginData, $expected)
$this->assertEquals($expected, $this->_model->hasDataChanged($abstractModelMock));
}
+ /**
+ * @return array
+ */
public function hasDataChangedDataProvider()
{
return [
@@ -566,6 +575,9 @@ public function testSaveNewObject($pkIncrement)
$reflectionMethod->invokeArgs($model, [$inputObject]);
}
+ /**
+ * @return array
+ */
public function saveNewObjectDataProvider()
{
return [[true], [false]];
diff --git a/lib/internal/Magento/Framework/Model/Test/Unit/ResourceModel/Db/Collection/AbstractCollectionTest.php b/lib/internal/Magento/Framework/Model/Test/Unit/ResourceModel/Db/Collection/AbstractCollectionTest.php
index 8ca30b525511b..7caf463457ed6 100644
--- a/lib/internal/Magento/Framework/Model/Test/Unit/ResourceModel/Db/Collection/AbstractCollectionTest.php
+++ b/lib/internal/Magento/Framework/Model/Test/Unit/ResourceModel/Db/Collection/AbstractCollectionTest.php
@@ -98,6 +98,9 @@ protected function tearDown()
\Magento\Framework\App\ObjectManager::setInstance($objectManagerMock);
}
+ /**
+ * @return object
+ */
protected function getUut()
{
return $this->objectManagerHelper->getObject(
@@ -219,6 +222,9 @@ public function testGetSelect($idFieldNameRet, $getPartRet, $expected)
$this->assertTrue($this->uut->getSelect() instanceof Select);
}
+ /**
+ * @return array
+ */
public function getSelectDataProvider()
{
$columnMock = $this->getMock('Zend_Db_Expr', ['__toString'], [], '', false);
@@ -245,6 +251,9 @@ public function testAddFieldToSelect($field, $alias, $expectedFieldsToSelect)
$this->assertTrue($this->uut->wereFieldsToSelectChanged());
}
+ /**
+ * @return array
+ */
public function addFieldToSelectDataProvider()
{
return [
@@ -264,6 +273,9 @@ public function testAddExpressionFieldToSelect($alias, $expression, $fields, $ex
$this->assertTrue($this->uut->addExpressionFieldToSelect($alias, $expression, $fields) instanceof Uut);
}
+ /**
+ * @return array
+ */
public function addExpressionFieldToSelectDataProvider()
{
return [
@@ -288,6 +300,9 @@ public function testRemoveFieldFromSelect(
$this->assertEquals($expectedWereFieldsToSelectChanged, $this->uut->wereFieldsToSelectChanged());
}
+ /**
+ * @return array
+ */
public function removeFieldFromSelectDataProvider()
{
return [
@@ -375,6 +390,9 @@ public function testJoin($table, $cond, $cols, $expected)
$this->assertEquals($expected, $this->uut->getJoinedTables());
}
+ /**
+ * @return array
+ */
public function joinDataProvider()
{
return [
@@ -416,26 +434,41 @@ public function testSave()
*/
class Uut extends AbstractCollection
{
+ /**
+ * @return bool
+ */
public function wereFieldsToSelectChanged()
{
return $this->_fieldsToSelectChanged;
}
+ /**
+ * @return array|null
+ */
public function getFieldsToSelect()
{
return $this->_fieldsToSelect;
}
+ /**
+ * @param array $fields
+ */
public function setFieldsToSelect(array $fields)
{
$this->_fieldsToSelect = $fields;
}
+ /**
+ * @param $resource
+ */
public function setResource($resource)
{
$this->_resource = $resource;
}
+ /**
+ * @return array
+ */
public function getJoinedTables()
{
return $this->_joinedTables;
diff --git a/lib/internal/Magento/Framework/Module/Test/Unit/Declaration/Converter/DomTest.php b/lib/internal/Magento/Framework/Module/Test/Unit/Declaration/Converter/DomTest.php
index 6a34f0ae4081e..b335804f58b02 100644
--- a/lib/internal/Magento/Framework/Module/Test/Unit/Declaration/Converter/DomTest.php
+++ b/lib/internal/Magento/Framework/Module/Test/Unit/Declaration/Converter/DomTest.php
@@ -42,6 +42,9 @@ public function testConvertWithInvalidDom($xmlString)
}
}
+ /**
+ * @return array
+ */
public function convertWithInvalidDomDataProvider()
{
return [
diff --git a/lib/internal/Magento/Framework/Module/Test/Unit/Dir/ReverseResolverTest.php b/lib/internal/Magento/Framework/Module/Test/Unit/Dir/ReverseResolverTest.php
index 4ab10bb953f85..7678d4a928e08 100644
--- a/lib/internal/Magento/Framework/Module/Test/Unit/Dir/ReverseResolverTest.php
+++ b/lib/internal/Magento/Framework/Module/Test/Unit/Dir/ReverseResolverTest.php
@@ -54,6 +54,9 @@ public function testGetModuleName($path, $expectedResult)
$this->assertSame($expectedResult, $this->_model->getModuleName($path));
}
+ /**
+ * @return array
+ */
public function getModuleNameDataProvider()
{
return [
diff --git a/lib/internal/Magento/Framework/Module/Test/Unit/ManagerTest.php b/lib/internal/Magento/Framework/Module/Test/Unit/ManagerTest.php
index 1d555bd782bae..1e2e957ff334f 100644
--- a/lib/internal/Magento/Framework/Module/Test/Unit/ManagerTest.php
+++ b/lib/internal/Magento/Framework/Module/Test/Unit/ManagerTest.php
@@ -80,6 +80,9 @@ public function testIsOutputEnabledGenericConfigPath($configValue, $expectedResu
$this->assertEquals($expectedResult, $this->_model->isOutputEnabled('Module_One'));
}
+ /**
+ * @return array
+ */
public function isOutputEnabledGenericConfigPathDataProvider()
{
return ['output disabled' => [true, false], 'output enabled' => [false, true]];
@@ -100,6 +103,9 @@ public function testIsOutputEnabledCustomConfigPath($configValue, $expectedResul
$this->assertEquals($expectedResult, $this->_model->isOutputEnabled('Module_Two'));
}
+ /**
+ * @return array
+ */
public function isOutputEnabledCustomConfigPathDataProvider()
{
return [
diff --git a/lib/internal/Magento/Framework/Mview/Test/Unit/View/ChangelogTest.php b/lib/internal/Magento/Framework/Mview/Test/Unit/View/ChangelogTest.php
index 3f942b241c021..6fe52712ccd3e 100644
--- a/lib/internal/Magento/Framework/Mview/Test/Unit/View/ChangelogTest.php
+++ b/lib/internal/Magento/Framework/Mview/Test/Unit/View/ChangelogTest.php
@@ -262,6 +262,10 @@ protected function mockGetTableName()
$this->resourceMock->expects($this->once())->method('getTableName')->will($this->returnArgument(0));
}
+ /**
+ * @param $changelogTableName
+ * @param $result
+ */
protected function mockIsTableExists($changelogTableName, $result)
{
$this->connectionMock->expects(
diff --git a/lib/internal/Magento/Framework/Mview/Test/Unit/ViewTest.php b/lib/internal/Magento/Framework/Mview/Test/Unit/ViewTest.php
index 68d2783158e8e..64f56b6d1de12 100644
--- a/lib/internal/Magento/Framework/Mview/Test/Unit/ViewTest.php
+++ b/lib/internal/Magento/Framework/Mview/Test/Unit/ViewTest.php
@@ -498,6 +498,9 @@ public function testResumeNotSuspended($status)
$this->model->resume();
}
+ /**
+ * @return array
+ */
public function dataProviderResumeNotSuspended()
{
return [
@@ -554,6 +557,9 @@ public function testIsEnabled($mode, $result)
$this->assertEquals($result, $this->model->isEnabled());
}
+ /**
+ * @return array
+ */
public function dataProviderIsEnabled()
{
return [
@@ -575,6 +581,9 @@ public function testIsIdle($status, $result)
$this->assertEquals($result, $this->model->isIdle());
}
+ /**
+ * @return array
+ */
public function dataProviderIsIdle()
{
return [
@@ -597,6 +606,9 @@ public function testIsWorking($status, $result)
$this->assertEquals($result, $this->model->isWorking());
}
+ /**
+ * @return array
+ */
public function dataProviderIsWorking()
{
return [
@@ -619,6 +631,9 @@ public function testIsSuspended($status, $result)
$this->assertEquals($result, $this->model->isSuspended());
}
+ /**
+ * @return array
+ */
public function dataProviderIsSuspended()
{
return [
@@ -651,6 +666,9 @@ protected function loadView()
$this->model->load($viewId);
}
+ /**
+ * @return array
+ */
protected function getViewData()
{
return [
diff --git a/lib/internal/Magento/Framework/ObjectManager/Test/Unit/Code/Generator/RepositoryTest.php b/lib/internal/Magento/Framework/ObjectManager/Test/Unit/Code/Generator/RepositoryTest.php
index cd02708e1023c..c70287a58577c 100644
--- a/lib/internal/Magento/Framework/ObjectManager/Test/Unit/Code/Generator/RepositoryTest.php
+++ b/lib/internal/Magento/Framework/ObjectManager/Test/Unit/Code/Generator/RepositoryTest.php
@@ -18,21 +18,33 @@ class RepositoryTest extends EntityChildTestAbstract
const GENERATOR_CLASS_NAME = 'Magento\Framework\ObjectManager\Code\Generator\Repository';
const OUTPUT_FILE_NAME = 'SampleConverter.php';
+ /**
+ * @return string
+ */
protected function getSourceClassName()
{
return self::SOURCE_CLASS_NAME;
}
+ /**
+ * @return string
+ */
protected function getResultClassName()
{
return self::RESULT_CLASS_NAME;
}
+ /**
+ * @return string
+ */
protected function getGeneratorClassName()
{
return self::GENERATOR_CLASS_NAME;
}
+ /**
+ * @return string
+ */
protected function getOutputFileName()
{
return self::OUTPUT_FILE_NAME;
diff --git a/lib/internal/Magento/Framework/ObjectManager/Test/Unit/Config/Reader/_files/ConfigDomMock.php b/lib/internal/Magento/Framework/ObjectManager/Test/Unit/Config/Reader/_files/ConfigDomMock.php
index b4b9e628164b3..3a9cf3b9efe8a 100644
--- a/lib/internal/Magento/Framework/ObjectManager/Test/Unit/Config/Reader/_files/ConfigDomMock.php
+++ b/lib/internal/Magento/Framework/ObjectManager/Test/Unit/Config/Reader/_files/ConfigDomMock.php
@@ -32,6 +32,9 @@ public function validate($schemaFile, $errors)
return true;
}
+ /**
+ * @return string
+ */
public function getDom()
{
return 'reader dom result';
diff --git a/lib/internal/Magento/Framework/ObjectManager/Test/Unit/DefinitionFactoryTest.php b/lib/internal/Magento/Framework/ObjectManager/Test/Unit/DefinitionFactoryTest.php
index a48e4fa3e88e3..cb6bfd1cdaadf 100644
--- a/lib/internal/Magento/Framework/ObjectManager/Test/Unit/DefinitionFactoryTest.php
+++ b/lib/internal/Magento/Framework/ObjectManager/Test/Unit/DefinitionFactoryTest.php
@@ -68,6 +68,9 @@ public function testCreatePluginsAndRelationsReadable($path, $callMethod, $expec
$this->assertInstanceOf($expectedClass, $this->model->$callMethod());
}
+ /**
+ * @return array
+ */
public function createPluginsAndRelationsReadableDataProvider()
{
return [
@@ -98,6 +101,9 @@ public function testCreatePluginsAndRelationsNotReadable($path, $callMethod, $ex
$this->assertInstanceOf($expectedClass, $this->model->$callMethod());
}
+ /**
+ * @return array
+ */
public function createPluginsAndRelationsNotReadableDataProvider()
{
return [
diff --git a/lib/internal/Magento/Framework/ObjectManager/Test/Unit/Relations/RuntimeTest.php b/lib/internal/Magento/Framework/ObjectManager/Test/Unit/Relations/RuntimeTest.php
index 37a3c9a57a620..9ac1700a22c8c 100644
--- a/lib/internal/Magento/Framework/ObjectManager/Test/Unit/Relations/RuntimeTest.php
+++ b/lib/internal/Magento/Framework/ObjectManager/Test/Unit/Relations/RuntimeTest.php
@@ -30,6 +30,9 @@ public function testGetParents($type, $parents)
$this->assertEquals($parents, $this->model->getParents($type));
}
+ /**
+ * @return array
+ */
public function getParentsDataProvider()
{
return [
diff --git a/lib/internal/Magento/Framework/ObjectManager/Test/Unit/_files/Aggregate/AggregateParent.php b/lib/internal/Magento/Framework/ObjectManager/Test/Unit/_files/Aggregate/AggregateParent.php
index 3c494b6abbb94..826e94c6cb8df 100644
--- a/lib/internal/Magento/Framework/ObjectManager/Test/Unit/_files/Aggregate/AggregateParent.php
+++ b/lib/internal/Magento/Framework/ObjectManager/Test/Unit/_files/Aggregate/AggregateParent.php
@@ -17,6 +17,14 @@ class AggregateParent implements \Magento\Test\Di\Aggregate\AggregateInterface
public $optionalScalar;
+ /**
+ * AggregateParent constructor.
+ * @param \Magento\Test\Di\DiInterface $interface
+ * @param \Magento\Test\Di\DiParent $parent
+ * @param \Magento\Test\Di\Child $child
+ * @param $scalar
+ * @param int $optionalScalar
+ */
public function __construct(
\Magento\Test\Di\DiInterface $interface,
\Magento\Test\Di\DiParent $parent,
diff --git a/lib/internal/Magento/Framework/ObjectManager/Test/Unit/_files/Aggregate/Child.php b/lib/internal/Magento/Framework/ObjectManager/Test/Unit/_files/Aggregate/Child.php
index b84375e3b5436..2d24e640e90fa 100644
--- a/lib/internal/Magento/Framework/ObjectManager/Test/Unit/_files/Aggregate/Child.php
+++ b/lib/internal/Magento/Framework/ObjectManager/Test/Unit/_files/Aggregate/Child.php
@@ -11,6 +11,16 @@ class Child extends \Magento\Test\Di\Aggregate\AggregateParent
public $secondOptionalScalar;
+ /**
+ * Child constructor.
+ * @param \Magento\Test\Di\DiInterface $interface
+ * @param \Magento\Test\Di\DiParent $parent
+ * @param \Magento\Test\Di\Child $child
+ * @param $scalar
+ * @param $secondScalar
+ * @param int $optionalScalar
+ * @param string $secondOptionalScalar
+ */
public function __construct(
\Magento\Test\Di\DiInterface $interface,
\Magento\Test\Di\DiParent $parent,
diff --git a/lib/internal/Magento/Framework/ObjectManager/Test/Unit/_files/Aggregate/WithOptional.php b/lib/internal/Magento/Framework/ObjectManager/Test/Unit/_files/Aggregate/WithOptional.php
index 1c5ac56e2735c..58ee7c819490d 100644
--- a/lib/internal/Magento/Framework/ObjectManager/Test/Unit/_files/Aggregate/WithOptional.php
+++ b/lib/internal/Magento/Framework/ObjectManager/Test/Unit/_files/Aggregate/WithOptional.php
@@ -11,6 +11,11 @@ class WithOptional
public $child;
+ /**
+ * WithOptional constructor.
+ * @param \Magento\Test\Di\DiParent|null $parent
+ * @param \Magento\Test\Di\Child|null $child
+ */
public function __construct(\Magento\Test\Di\DiParent $parent = null, \Magento\Test\Di\Child $child = null)
{
$this->parent = $parent;
diff --git a/lib/internal/Magento/Framework/Pricing/Test/Unit/Adjustment/CollectionTest.php b/lib/internal/Magento/Framework/Pricing/Test/Unit/Adjustment/CollectionTest.php
index f22213a19d76d..8d2ae0e923647 100644
--- a/lib/internal/Magento/Framework/Pricing/Test/Unit/Adjustment/CollectionTest.php
+++ b/lib/internal/Magento/Framework/Pricing/Test/Unit/Adjustment/CollectionTest.php
@@ -79,6 +79,9 @@ public function testGetItems($adjustments, $expectedResult)
$this->assertEmpty(array_diff($expectedResult, array_keys($result)));
}
+ /**
+ * @return array
+ */
public function getItemsDataProvider()
{
return [
@@ -104,6 +107,9 @@ public function testGetItemByCode($adjustments, $code, $expectedResult)
$this->assertEquals($expectedResult, $item->getAdjustmentCode());
}
+ /**
+ * @return array
+ */
public function getItemByCodeDataProvider()
{
return [
diff --git a/lib/internal/Magento/Framework/Pricing/Test/Unit/Adjustment/PoolTest.php b/lib/internal/Magento/Framework/Pricing/Test/Unit/Adjustment/PoolTest.php
index 8e7f9b49fd4cd..066a2ee575f93 100644
--- a/lib/internal/Magento/Framework/Pricing/Test/Unit/Adjustment/PoolTest.php
+++ b/lib/internal/Magento/Framework/Pricing/Test/Unit/Adjustment/PoolTest.php
@@ -65,6 +65,9 @@ public function testGetAdjustmentByCode($code, $expectedResult)
$this->assertEquals($expectedResult, $result);
}
+ /**
+ * @return array
+ */
public function getAdjustmentByCodeDataProvider()
{
return [
diff --git a/lib/internal/Magento/Framework/Pricing/Test/Unit/Helper/DataTest.php b/lib/internal/Magento/Framework/Pricing/Test/Unit/Helper/DataTest.php
index b177c4d4fcb85..9699b30cd8527 100644
--- a/lib/internal/Magento/Framework/Pricing/Test/Unit/Helper/DataTest.php
+++ b/lib/internal/Magento/Framework/Pricing/Test/Unit/Helper/DataTest.php
@@ -50,6 +50,9 @@ public function testCurrency($amount, $format, $includeContainer, $result)
$this->assertEquals($result, $helper->currency($amount, $format, $includeContainer));
}
+ /**
+ * @return array
+ */
public function currencyDataProvider()
{
return [
@@ -84,6 +87,9 @@ public function testCurrencyByStore($amount, $store, $format, $includeContainer,
$this->assertEquals($result, $helper->currencyByStore($amount, $store, $format, $includeContainer));
}
+ /**
+ * @return array
+ */
public function currencyByStoreDataProvider()
{
return [
diff --git a/lib/internal/Magento/Framework/Pricing/Test/Unit/PriceInfo/FactoryTest.php b/lib/internal/Magento/Framework/Pricing/Test/Unit/PriceInfo/FactoryTest.php
index 7a982673c8999..859068e09bbe2 100644
--- a/lib/internal/Magento/Framework/Pricing/Test/Unit/PriceInfo/FactoryTest.php
+++ b/lib/internal/Magento/Framework/Pricing/Test/Unit/PriceInfo/FactoryTest.php
@@ -92,6 +92,9 @@ protected function setUp()
$this->factory = new Factory($this->types, $this->objectManagerMock);
}
+ /**
+ * @return array
+ */
public function createPriceInfoDataProvider()
{
return [
diff --git a/lib/internal/Magento/Framework/Pricing/Test/Unit/Render/AmountTest.php b/lib/internal/Magento/Framework/Pricing/Test/Unit/Render/AmountTest.php
index e6b1ebc05f216..8f3b21ab70852 100644
--- a/lib/internal/Magento/Framework/Pricing/Test/Unit/Render/AmountTest.php
+++ b/lib/internal/Magento/Framework/Pricing/Test/Unit/Render/AmountTest.php
@@ -283,6 +283,12 @@ public function testAdjustmentsHtml()
$this->assertEquals($adjustmentHtml1 . $adjustmentHtml2, $this->model->getAdjustmentsHtml());
}
+ /**
+ * @param array $data
+ * @param string $html
+ * @param string $code
+ * @return \PHPUnit_Framework_MockObject_MockObject
+ */
protected function getAdjustmentRenderMock($data = [], $html = '', $code = 'adjustment_code')
{
$adjustmentRender = $this->getMockForAbstractClass(
diff --git a/lib/internal/Magento/Framework/Pricing/Test/Unit/Render/PriceBoxTest.php b/lib/internal/Magento/Framework/Pricing/Test/Unit/Render/PriceBoxTest.php
index eca27dfc5324b..a18472d655389 100644
--- a/lib/internal/Magento/Framework/Pricing/Test/Unit/Render/PriceBoxTest.php
+++ b/lib/internal/Magento/Framework/Pricing/Test/Unit/Render/PriceBoxTest.php
@@ -113,6 +113,9 @@ public function testToHtml($data, $priceCode, $cssClasses)
$this->assertEquals($cssClasses, $priceBox->getData('css_classes'));
}
+ /**
+ * @return array
+ */
public function toHtmlDataProvider()
{
return [
@@ -216,6 +219,9 @@ public function testGetPriceId($prefix, $suffix, $defaultPrefix, $defaultSuffix)
$this->assertEquals($expectedPriceId, $this->model->getPriceId($defaultPrefix, $defaultSuffix));
}
+ /**
+ * @return array
+ */
public function getPriceIdProvider()
{
return [
diff --git a/lib/internal/Magento/Framework/Reflection/Test/Unit/ExtensionAttributesProcessorTest.php b/lib/internal/Magento/Framework/Reflection/Test/Unit/ExtensionAttributesProcessorTest.php
index 8dffc20aa1630..d1570d5848728 100644
--- a/lib/internal/Magento/Framework/Reflection/Test/Unit/ExtensionAttributesProcessorTest.php
+++ b/lib/internal/Magento/Framework/Reflection/Test/Unit/ExtensionAttributesProcessorTest.php
@@ -154,6 +154,9 @@ public function testBuildOutputDataArrayWithPermission($isPermissionAllowed, $ex
);
}
+ /**
+ * @return array
+ */
public function buildOutputDataArrayWithPermissionProvider()
{
return [
diff --git a/lib/internal/Magento/Framework/Reflection/Test/Unit/TypeProcessorTest.php b/lib/internal/Magento/Framework/Reflection/Test/Unit/TypeProcessorTest.php
index 092f0aa1dd63f..666ef8b7c2ef3 100644
--- a/lib/internal/Magento/Framework/Reflection/Test/Unit/TypeProcessorTest.php
+++ b/lib/internal/Magento/Framework/Reflection/Test/Unit/TypeProcessorTest.php
@@ -217,6 +217,9 @@ public function testProcessSimpleTypeException($value, $type)
$this->_typeProcessor->processSimpleAndAnyType($value, $type);
}
+ /**
+ * @return array
+ */
public static function processSimpleTypeExceptionProvider()
{
return [
diff --git a/lib/internal/Magento/Framework/Search/Request/Config/SchemaLocator.php b/lib/internal/Magento/Framework/Search/Request/Config/SchemaLocator.php
index 8c2c158f9d539..4b14acb13b02c 100644
--- a/lib/internal/Magento/Framework/Search/Request/Config/SchemaLocator.php
+++ b/lib/internal/Magento/Framework/Search/Request/Config/SchemaLocator.php
@@ -13,6 +13,10 @@ class SchemaLocator implements \Magento\Framework\Config\SchemaLocatorInterface
/** @var \Magento\Framework\Config\Dom\UrnResolver */
protected $urnResolver;
+ /**
+ * SchemaLocator constructor.
+ * @param \Magento\Framework\Config\Dom\UrnResolver $urnResolver
+ */
public function __construct(\Magento\Framework\Config\Dom\UrnResolver $urnResolver)
{
$this->urnResolver = $urnResolver;
diff --git a/lib/internal/Magento/Framework/Search/Test/Unit/Request/MapperTest.php b/lib/internal/Magento/Framework/Search/Test/Unit/Request/MapperTest.php
index 08403ba5e9dc2..c6c2082c6f2c1 100644
--- a/lib/internal/Magento/Framework/Search/Test/Unit/Request/MapperTest.php
+++ b/lib/internal/Magento/Framework/Search/Test/Unit/Request/MapperTest.php
@@ -849,6 +849,9 @@ public function testGetFilterException()
$this->assertEquals($this->queryBool, $mapper->getRootQuery());
}
+ /**
+ * @return array
+ */
public function getQueryMatchProvider()
{
return [
@@ -876,6 +879,9 @@ public function getQueryMatchProvider()
];
}
+ /**
+ * @return array
+ */
public function getQueryFilterQueryReferenceProvider()
{
return [
@@ -923,6 +929,9 @@ public function getQueryFilterQueryReferenceProvider()
];
}
+ /**
+ * @return array
+ */
public function getQueryBoolProvider()
{
return [
diff --git a/lib/internal/Magento/Framework/Session/Test/Unit/ConfigTest.php b/lib/internal/Magento/Framework/Session/Test/Unit/ConfigTest.php
index 4a613d2685142..08a8896a64833 100644
--- a/lib/internal/Magento/Framework/Session/Test/Unit/ConfigTest.php
+++ b/lib/internal/Magento/Framework/Session/Test/Unit/ConfigTest.php
@@ -81,6 +81,9 @@ public function testSetOptions($option, $getter, $value)
$this->assertSame($value, $this->config->{$getter}());
}
+ /**
+ * @return array
+ */
public function optionsProvider()
{
return [
@@ -342,6 +345,9 @@ public function testConstructor($isValidSame, $isValid, $expected)
$this->assertEquals($expected, $this->config->getOptions());
}
+ /**
+ * @return array
+ */
public function constructorDataProvider()
{
return [
diff --git a/lib/internal/Magento/Framework/Session/Test/Unit/SaveHandler/Redis/LoggerTest.php b/lib/internal/Magento/Framework/Session/Test/Unit/SaveHandler/Redis/LoggerTest.php
index b85d2c6f61e95..18a8e20c3b7f3 100644
--- a/lib/internal/Magento/Framework/Session/Test/Unit/SaveHandler/Redis/LoggerTest.php
+++ b/lib/internal/Magento/Framework/Session/Test/Unit/SaveHandler/Redis/LoggerTest.php
@@ -70,6 +70,9 @@ public function testLog($logLevel, $method)
$this->logger->log($message, $logLevel);
}
+ /**
+ * @return array
+ */
public function logDataProvider()
{
return [
diff --git a/lib/internal/Magento/Framework/Shell/Test/Unit/CommandRendererTest.php b/lib/internal/Magento/Framework/Shell/Test/Unit/CommandRendererTest.php
index 79c06abce30a8..88d07e349fd89 100644
--- a/lib/internal/Magento/Framework/Shell/Test/Unit/CommandRendererTest.php
+++ b/lib/internal/Magento/Framework/Shell/Test/Unit/CommandRendererTest.php
@@ -24,6 +24,9 @@ public function testRender($expectedCommand, $actualCommand, $testArguments)
);
}
+ /**
+ * @return array
+ */
public function commandsDataProvider()
{
$testArgument = 'argument';
diff --git a/lib/internal/Magento/Framework/Simplexml/Test/Unit/ElementTest.php b/lib/internal/Magento/Framework/Simplexml/Test/Unit/ElementTest.php
index e1c96fd6e04bc..7c3b80350a41a 100644
--- a/lib/internal/Magento/Framework/Simplexml/Test/Unit/ElementTest.php
+++ b/lib/internal/Magento/Framework/Simplexml/Test/Unit/ElementTest.php
@@ -108,6 +108,9 @@ public function testSetAttribute($name, $value)
$this->assertEquals($xml->getAttribute($name), $value);
}
+ /**
+ * @return array
+ */
public function setAttributeDataProvider()
{
return [
diff --git a/lib/internal/Magento/Framework/Stdlib/Test/Unit/BooleanUtilsTest.php b/lib/internal/Magento/Framework/Stdlib/Test/Unit/BooleanUtilsTest.php
index 7589d2f58ba51..5cc3a0132afcc 100644
--- a/lib/internal/Magento/Framework/Stdlib/Test/Unit/BooleanUtilsTest.php
+++ b/lib/internal/Magento/Framework/Stdlib/Test/Unit/BooleanUtilsTest.php
@@ -38,6 +38,9 @@ public function testToBoolean($input, $expected)
$this->assertSame($expected, $actual);
}
+ /**
+ * @return array
+ */
public function toBooleanDataProvider()
{
return [
@@ -64,6 +67,9 @@ public function testToBooleanException($input)
$this->object->toBoolean($input);
}
+ /**
+ * @return array
+ */
public function toBooleanExceptionDataProvider()
{
return [
diff --git a/lib/internal/Magento/Framework/Stdlib/Test/Unit/Cookie/PhpCookieManagerTest.php b/lib/internal/Magento/Framework/Stdlib/Test/Unit/Cookie/PhpCookieManagerTest.php
index cef58f94edbd9..d40c25b86f1da 100644
--- a/lib/internal/Magento/Framework/Stdlib/Test/Unit/Cookie/PhpCookieManagerTest.php
+++ b/lib/internal/Magento/Framework/Stdlib/Test/Unit/Cookie/PhpCookieManagerTest.php
@@ -252,6 +252,9 @@ public function testSetSensitiveCookieNoMetadata($cookieName, $secure)
$this->assertTrue(self::$isSetCookieInvoked);
}
+ /**
+ * @return array
+ */
public function isCurrentlySecureDataProvider()
{
return [
@@ -814,6 +817,11 @@ private static function assertCookieSize(
self::assertEquals('', $path);
}
+ /**
+ * @param $get
+ * @param $default
+ * @param $return
+ */
protected function stubGetCookie($get, $default, $return)
{
$this->readerMock->expects($this->atLeastOnce())
diff --git a/lib/internal/Magento/Framework/Stdlib/Test/Unit/Cookie/SensitiveCookieMetadataTest.php b/lib/internal/Magento/Framework/Stdlib/Test/Unit/Cookie/SensitiveCookieMetadataTest.php
index ff8aba1424a92..60dea5fd2d61d 100644
--- a/lib/internal/Magento/Framework/Stdlib/Test/Unit/Cookie/SensitiveCookieMetadataTest.php
+++ b/lib/internal/Magento/Framework/Stdlib/Test/Unit/Cookie/SensitiveCookieMetadataTest.php
@@ -59,6 +59,9 @@ public function testConstructorAndGetHttpOnly($metadata, $httpOnly)
$this->assertEquals('path', $object->getPath());
}
+ /**
+ * @return array
+ */
public function constructorAndGetHttpOnlyTestDataProvider()
{
return [
@@ -104,6 +107,9 @@ public function testGetSecure($isSecure, $metadata, $expected, $callNum = 1)
$this->assertEquals($expected, $object->getSecure());
}
+ /**
+ * @return array
+ */
public function getSecureDataProvider()
{
return [
@@ -160,6 +166,9 @@ public function testToArray($isSecure, $metadata, $expected, $callNum = 1)
$this->assertEquals($expected, $object->__toArray());
}
+ /**
+ * @return array
+ */
public function toArrayDataProvider()
{
return [
diff --git a/lib/internal/Magento/Framework/Stdlib/Test/Unit/DateTime/TimezoneTest.php b/lib/internal/Magento/Framework/Stdlib/Test/Unit/DateTime/TimezoneTest.php
index efe2dca4a1d10..c51f598fa305e 100644
--- a/lib/internal/Magento/Framework/Stdlib/Test/Unit/DateTime/TimezoneTest.php
+++ b/lib/internal/Magento/Framework/Stdlib/Test/Unit/DateTime/TimezoneTest.php
@@ -50,6 +50,9 @@ public function testDate($date, $locale, $expectedTimestamp)
$this->assertEquals($expectedTimestamp, $date->getTimestamp());
}
+ /**
+ * @return array
+ */
public function dateDataProvider()
{
return [
diff --git a/lib/internal/Magento/Framework/Test/Unit/ArchiveTest.php b/lib/internal/Magento/Framework/Test/Unit/ArchiveTest.php
index db9f0feb1b37a..afee925772e75 100644
--- a/lib/internal/Magento/Framework/Test/Unit/ArchiveTest.php
+++ b/lib/internal/Magento/Framework/Test/Unit/ArchiveTest.php
@@ -64,6 +64,9 @@ public function testIsArchive($file, $isArchive)
$this->assertEquals($isArchive, $this->archive->isArchive($file));
}
+ /**
+ * @return array
+ */
public function isArchiveProvider()
{
return [
@@ -98,6 +101,9 @@ public function testIsTar($file, $isArchive)
$this->assertEquals($isArchive, $this->archive->isTar($file));
}
+ /**
+ * @return array
+ */
public function isTarProvider()
{
return [
@@ -143,6 +149,9 @@ public function testPackUnpackGzBz($destinationFile, $extensionRequired)
$this->assertStringStartsWith($this->destinationDir, $this->unpacked);
}
+ /**
+ * @return array
+ */
public function destinationProvider()
{
return [
@@ -200,6 +209,9 @@ public function testExtract($destinationFile, $extensionRequired)
$this->assertStringStartsWith($this->destinationDir, $this->unpacked);
}
+ /**
+ * @return array
+ */
public function tarProvider()
{
return [
diff --git a/lib/internal/Magento/Framework/Test/Unit/FlagTest.php b/lib/internal/Magento/Framework/Test/Unit/FlagTest.php
index 1e35a012ff60b..a7265583306ca 100644
--- a/lib/internal/Magento/Framework/Test/Unit/FlagTest.php
+++ b/lib/internal/Magento/Framework/Test/Unit/FlagTest.php
@@ -23,6 +23,9 @@ protected function setUp()
$this->createInstance($data);
}
+ /**
+ * @param array $data
+ */
protected function createInstance(array $data = [])
{
$eventManager = $this->getMock('Magento\Framework\Event\Manager', ['dispatch'], [], '', false, false);
diff --git a/lib/internal/Magento/Framework/Test/Unit/Message/PhraseFactoryTest.php b/lib/internal/Magento/Framework/Test/Unit/Message/PhraseFactoryTest.php
index 9e59e6a844539..9b3a9d8e21ef3 100644
--- a/lib/internal/Magento/Framework/Test/Unit/Message/PhraseFactoryTest.php
+++ b/lib/internal/Magento/Framework/Test/Unit/Message/PhraseFactoryTest.php
@@ -33,6 +33,9 @@ public function testCreate($mainMessage, $subMessages, $separator, $expectedResu
$this->assertEquals($expectedResult, $result);
}
+ /**
+ * @return array
+ */
public function dataProvider()
{
$subMessage1 = new Error('go jogging');
@@ -52,5 +55,4 @@ public function dataProvider()
],
];
}
-
}
diff --git a/lib/internal/Magento/Framework/Test/Unit/ObjectTest.php b/lib/internal/Magento/Framework/Test/Unit/ObjectTest.php
index 625a1102f9dab..c274503bdf915 100644
--- a/lib/internal/Magento/Framework/Test/Unit/ObjectTest.php
+++ b/lib/internal/Magento/Framework/Test/Unit/ObjectTest.php
@@ -366,6 +366,9 @@ public function testUnderscore($input, $expectedOutput)
$this->assertEquals($expectedOutput, $output);
}
+ /**
+ * @return array
+ */
public function underscoreDataProvider()
{
return [
diff --git a/lib/internal/Magento/Framework/Test/Unit/ShellTest.php b/lib/internal/Magento/Framework/Test/Unit/ShellTest.php
index b185bbd68c3ff..42b16af34af67 100644
--- a/lib/internal/Magento/Framework/Test/Unit/ShellTest.php
+++ b/lib/internal/Magento/Framework/Test/Unit/ShellTest.php
@@ -83,6 +83,9 @@ public function testExecuteLog($command, $commandArgs, $expectedResult, $expecte
);
}
+ /**
+ * @return array
+ */
public function executeDataProvider()
{
// backtick symbol (`) has to be replaced with environment-dependent quote character
diff --git a/lib/internal/Magento/Framework/Test/Unit/TranslateTest.php b/lib/internal/Magento/Framework/Test/Unit/TranslateTest.php
index cac16773c989b..5ca91b2d05101 100644
--- a/lib/internal/Magento/Framework/Test/Unit/TranslateTest.php
+++ b/lib/internal/Magento/Framework/Test/Unit/TranslateTest.php
@@ -121,6 +121,9 @@ public function testLoadDataCachedTranslation($area, $forceReload, $cachedData)
$this->assertEquals($cachedData, $this->translate->getData());
}
+ /**
+ * @return array
+ */
public function dataProviderLoadDataCachedTranslation()
{
$cachedData = ['cached 1' => 'translated 1', 'cached 2' => 'translated 2'];
@@ -216,6 +219,9 @@ public function testLoadData($area, $forceReload)
$this->assertEquals($expected, $this->translate->getData());
}
+ /**
+ * @return array
+ */
public function dataProviderForTestLoadData()
{
return [
@@ -243,6 +249,9 @@ public function testGetData($data, $result)
$this->assertEquals($result, $this->translate->getData());
}
+ /**
+ * @return array
+ */
public function dataProviderForTestGetData()
{
$data = ['original 1' => 'translated 1', 'original 2' => 'translated 2'];
diff --git a/lib/internal/Magento/Framework/Translate/Test/Unit/InlineTest.php b/lib/internal/Magento/Framework/Translate/Test/Unit/InlineTest.php
index 19b83aac6cc5f..12bea7f541513 100644
--- a/lib/internal/Magento/Framework/Translate/Test/Unit/InlineTest.php
+++ b/lib/internal/Magento/Framework/Translate/Test/Unit/InlineTest.php
@@ -92,6 +92,9 @@ public function testIsAllowed($isEnabled, $isActive, $isDevAllowed, $result)
$this->assertEquals($result, $model->isAllowed());
}
+ /**
+ * @return array
+ */
public function isAllowedDataProvider()
{
return [
@@ -144,6 +147,9 @@ public function testProcessResponseBodyStripInline($body, $expected)
$this->assertEquals($body, $expected);
}
+ /**
+ * @return array
+ */
public function processResponseBodyStripInlineDataProvider()
{
return [
@@ -210,6 +216,9 @@ public function testProcessResponseBody($scope, $body, $expected)
$this->assertEquals($body, $expected);
}
+ /**
+ * @return array
+ */
public function processResponseBodyDataProvider()
{
return [
@@ -272,6 +281,9 @@ public function testProcessResponseBodyGetInlineScript($scope, $body, $expected)
$this->assertEquals($body, $expected);
}
+ /**
+ * @return array
+ */
public function processResponseBodyGetInlineScriptDataProvider()
{
return [
diff --git a/lib/internal/Magento/Framework/Unserialize/Test/Unit/UnserializeTest.php b/lib/internal/Magento/Framework/Unserialize/Test/Unit/UnserializeTest.php
index cca250e7eef23..258866cc982cd 100644
--- a/lib/internal/Magento/Framework/Unserialize/Test/Unit/UnserializeTest.php
+++ b/lib/internal/Magento/Framework/Unserialize/Test/Unit/UnserializeTest.php
@@ -36,6 +36,9 @@ public function testUnserializeObject($serialized)
$this->assertFalse($this->unserialize->unserialize($serialized));
}
+ /**
+ * @return array
+ */
public function serializedObjectDataProvider()
{
return [
diff --git a/lib/internal/Magento/Framework/Url/Test/Unit/Helper/DataTest.php b/lib/internal/Magento/Framework/Url/Test/Unit/Helper/DataTest.php
index b0c5e11592d95..bea8bfcfad6d6 100644
--- a/lib/internal/Magento/Framework/Url/Test/Unit/Helper/DataTest.php
+++ b/lib/internal/Magento/Framework/Url/Test/Unit/Helper/DataTest.php
@@ -79,6 +79,9 @@ public function testGetEncodedUrl($url, $callNum)
$this->assertEquals($encodedUrl, $helper->getEncodedUrl($url));
}
+ /**
+ * @return array
+ */
public function getEncodedUrlDataProvider()
{
return [
@@ -98,6 +101,9 @@ public function testAddRequestParam($param, $expected)
$this->assertEquals($expected, $helper->addRequestParam('http://example.com', $param));
}
+ /**
+ * @return array
+ */
public function addRequestParamDataProvider()
{
return [
@@ -145,6 +151,9 @@ public function testRemoveRequestParam($paramKey, $expected)
$this->assertEquals($expected, $helper->removeRequestParam($url, $paramKey));
}
+ /**
+ * @return array
+ */
public function removeRequestParamDataProvider()
{
return [
diff --git a/lib/internal/Magento/Framework/Url/Test/Unit/SecurityInfoTest.php b/lib/internal/Magento/Framework/Url/Test/Unit/SecurityInfoTest.php
index 0cb5bac48509d..d2d3463d181b0 100644
--- a/lib/internal/Magento/Framework/Url/Test/Unit/SecurityInfoTest.php
+++ b/lib/internal/Magento/Framework/Url/Test/Unit/SecurityInfoTest.php
@@ -32,6 +32,9 @@ public function testIsSecureChecksIfUrlIsInSecureList($url, $expected)
$this->assertEquals($expected, $this->_model->isSecure($url));
}
+ /**
+ * @return array
+ */
public function secureUrlDataProvider()
{
return [
diff --git a/lib/internal/Magento/Framework/Validator/Test/Unit/ObjectTest.php b/lib/internal/Magento/Framework/Validator/Test/Unit/ObjectTest.php
index 8179ba7e342fc..5662e40683831 100644
--- a/lib/internal/Magento/Framework/Validator/Test/Unit/ObjectTest.php
+++ b/lib/internal/Magento/Framework/Validator/Test/Unit/ObjectTest.php
@@ -92,6 +92,9 @@ public function testIsValid(array $inputEntityData, array $expectedErrors)
}
}
+ /**
+ * @return array
+ */
public function validateDataProvider()
{
return [
diff --git a/lib/internal/Magento/Framework/View/Layout.php b/lib/internal/Magento/Framework/View/Layout.php
index ff75afafbe689..ee68ef2cbdcc2 100755
--- a/lib/internal/Magento/Framework/View/Layout.php
+++ b/lib/internal/Magento/Framework/View/Layout.php
@@ -517,7 +517,7 @@ public function renderNonCachedElement($name)
} elseif ($this->isBlock($name)) {
$result = $this->_renderBlock($name);
} else {
- $result = $this->_renderContainer($name);
+ $result = $this->_renderContainer($name, false);
}
} catch (\Exception $e) {
if ($this->appState->getMode() === AppState::MODE_DEVELOPER) {
@@ -559,14 +559,15 @@ protected function _renderUiComponent($name)
* Gets HTML of container element
*
* @param string $name
+ * @param bool $useCache
* @return string
*/
- protected function _renderContainer($name)
+ protected function _renderContainer($name, $useCache = true)
{
$html = '';
$children = $this->getChildNames($name);
foreach ($children as $child) {
- $html .= $this->renderElement($child);
+ $html .= $this->renderElement($child, $useCache);
}
if ($html == '' || !$this->structure->getAttribute($name, Element::CONTAINER_OPT_HTML_TAG)) {
return $html;
diff --git a/lib/internal/Magento/Framework/View/Test/Unit/Asset/File/FallbackContextTest.php b/lib/internal/Magento/Framework/View/Test/Unit/Asset/File/FallbackContextTest.php
index 05006b82b7b31..d43dd6e8c47fc 100644
--- a/lib/internal/Magento/Framework/View/Test/Unit/Asset/File/FallbackContextTest.php
+++ b/lib/internal/Magento/Framework/View/Test/Unit/Asset/File/FallbackContextTest.php
@@ -53,6 +53,9 @@ public function testGetConfigPath(
$this->assertEquals($expectedResult, $this->fallbackContext->getConfigPath());
}
+ /**
+ * @return array
+ */
public function getConfigPathDataProvider()
{
return [
diff --git a/lib/internal/Magento/Framework/View/Test/Unit/Asset/FileTest.php b/lib/internal/Magento/Framework/View/Test/Unit/Asset/FileTest.php
index 6f781171f15c9..0d391fc865307 100644
--- a/lib/internal/Magento/Framework/View/Test/Unit/Asset/FileTest.php
+++ b/lib/internal/Magento/Framework/View/Test/Unit/Asset/FileTest.php
@@ -134,6 +134,9 @@ public function testGetContent($content)
$this->assertEquals($content, $this->object->getContent()); // no in-memory caching for content
}
+ /**
+ * @return array
+ */
public function getContentDataProvider()
{
return [
diff --git a/lib/internal/Magento/Framework/View/Test/Unit/Asset/MergeServiceTest.php b/lib/internal/Magento/Framework/View/Test/Unit/Asset/MergeServiceTest.php
index c920360971abb..137e01891b664 100644
--- a/lib/internal/Magento/Framework/View/Test/Unit/Asset/MergeServiceTest.php
+++ b/lib/internal/Magento/Framework/View/Test/Unit/Asset/MergeServiceTest.php
@@ -18,6 +18,7 @@
/**
* Class MergeServiceTest
+ * @SuppressWarnings(PHPMD.CouplingBetweenObjects)
*/
class MergeServiceTest extends \PHPUnit_Framework_TestCase
{
@@ -117,6 +118,9 @@ public function testGetMergedAssets(array $assets, $contentType, $appMode, $merg
$this->assertSame($mergedAsset, $this->object->getMergedAssets($assets, $contentType));
}
+ /**
+ * @return array
+ */
public static function getMergedAssetsDataProvider()
{
$jsAssets = [
diff --git a/lib/internal/Magento/Framework/View/Test/Unit/ContextTest.php b/lib/internal/Magento/Framework/View/Test/Unit/ContextTest.php
index 8047442510fef..4d39251340b98 100644
--- a/lib/internal/Magento/Framework/View/Test/Unit/ContextTest.php
+++ b/lib/internal/Magento/Framework/View/Test/Unit/ContextTest.php
@@ -221,6 +221,9 @@ public function testGetAcceptType($headerAccept, $acceptType)
$this->assertEquals($acceptType, $this->context->getAcceptType());
}
+ /**
+ * @return array
+ */
public function getAcceptTypeDataProvider()
{
return [
diff --git a/lib/internal/Magento/Framework/View/Test/Unit/DataSourcePoolTest.php b/lib/internal/Magento/Framework/View/Test/Unit/DataSourcePoolTest.php
index d7342a202486f..18d0f02c2a261 100644
--- a/lib/internal/Magento/Framework/View/Test/Unit/DataSourcePoolTest.php
+++ b/lib/internal/Magento/Framework/View/Test/Unit/DataSourcePoolTest.php
@@ -46,6 +46,10 @@ public function testAddWithException()
$this->dataSourcePool->add('DataSourcePoolTestBlock', 'NotExistingBlockClass');
}
+ /**
+ * @param $blockClass
+ * @return mixed
+ */
protected function createBlock($blockClass)
{
$block = $this->getMock('Magento\Framework\View\Element\BlockInterface');
diff --git a/lib/internal/Magento/Framework/View/Test/Unit/Element/Html/LinkTest.php b/lib/internal/Magento/Framework/View/Test/Unit/Element/Html/LinkTest.php
index f4e3e6ebf56e2..4841ec3e2671d 100644
--- a/lib/internal/Magento/Framework/View/Test/Unit/Element/Html/LinkTest.php
+++ b/lib/internal/Magento/Framework/View/Test/Unit/Element/Html/LinkTest.php
@@ -35,6 +35,9 @@ public function testGetLinkAttributes($link, $expected)
$this->assertEquals($expected, $link->getLinkAttributes());
}
+ /**
+ * @return array
+ */
public function getLinkAttributesDataProvider()
{
$objectManagerHelper = new \Magento\Framework\TestFramework\Unit\Helper\ObjectManager($this);
diff --git a/lib/internal/Magento/Framework/View/Test/Unit/Element/Js/CookieTest.php b/lib/internal/Magento/Framework/View/Test/Unit/Element/Js/CookieTest.php
index 8291c1dbfa9b4..f6c80ff28cdf8 100644
--- a/lib/internal/Magento/Framework/View/Test/Unit/Element/Js/CookieTest.php
+++ b/lib/internal/Magento/Framework/View/Test/Unit/Element/Js/CookieTest.php
@@ -83,6 +83,9 @@ public function testGetDomain($domain, $isIp, $expectedResult)
$this->assertEquals($expectedResult, $result);
}
+ /**
+ * @return array
+ */
public static function domainDataProvider()
{
return [
diff --git a/lib/internal/Magento/Framework/View/Test/Unit/Element/Text/TextList/ItemTest.php b/lib/internal/Magento/Framework/View/Test/Unit/Element/Text/TextList/ItemTest.php
index d29fc50b10396..efa2c30cde0a2 100644
--- a/lib/internal/Magento/Framework/View/Test/Unit/Element/Text/TextList/ItemTest.php
+++ b/lib/internal/Magento/Framework/View/Test/Unit/Element/Text/TextList/ItemTest.php
@@ -56,6 +56,9 @@ public function testToHtml($liParams, $attrName, $attrValue, $innerText)
], $this->item->toHtml());
}
+ /**
+ * @return array
+ */
public function toHtmlDataProvider()
{
return [
diff --git a/lib/internal/Magento/Framework/View/Test/Unit/Element/Text/TextList/LinkTest.php b/lib/internal/Magento/Framework/View/Test/Unit/Element/Text/TextList/LinkTest.php
index 395bc9fec086d..15070facd5945 100644
--- a/lib/internal/Magento/Framework/View/Test/Unit/Element/Text/TextList/LinkTest.php
+++ b/lib/internal/Magento/Framework/View/Test/Unit/Element/Text/TextList/LinkTest.php
@@ -62,6 +62,9 @@ public function testToHtml($liParams, $liAttr, $aParams, $aAttr, $innerText, $af
], $this->link->toHtml());
}
+ /**
+ * @return array
+ */
public function toHtmlDataProvider()
{
return [
diff --git a/lib/internal/Magento/Framework/View/Test/Unit/File/Collector/Decorator/ModuleDependencyTest.php b/lib/internal/Magento/Framework/View/Test/Unit/File/Collector/Decorator/ModuleDependencyTest.php
index 6c0b8487b465b..dfb77bb3b58c4 100644
--- a/lib/internal/Magento/Framework/View/Test/Unit/File/Collector/Decorator/ModuleDependencyTest.php
+++ b/lib/internal/Magento/Framework/View/Test/Unit/File/Collector/Decorator/ModuleDependencyTest.php
@@ -54,6 +54,9 @@ public function testGetFiles(array $fixtureFiles, array $expectedFiles, $message
$this->assertSame($expectedFiles, $this->_model->getFiles($theme, '*.xml'), $message);
}
+ /**
+ * @return array
+ */
public function getFilesDataProvider()
{
$fileOne = new \Magento\Framework\View\File('b.xml', 'Fixture_ModuleB');
diff --git a/lib/internal/Magento/Framework/View/Test/Unit/Layout/Argument/Interpreter/HelperMethodTest.php b/lib/internal/Magento/Framework/View/Test/Unit/Layout/Argument/Interpreter/HelperMethodTest.php
index 62203b72dd391..8dba7c9ce753b 100644
--- a/lib/internal/Magento/Framework/View/Test/Unit/Layout/Argument/Interpreter/HelperMethodTest.php
+++ b/lib/internal/Magento/Framework/View/Test/Unit/Layout/Argument/Interpreter/HelperMethodTest.php
@@ -59,6 +59,10 @@ public function testEvaluate()
$this->assertSame($expected, $actual);
}
+ /**
+ * @param $input
+ * @return string
+ */
public function help($input)
{
$this->assertSame('some text (evaluated)', $input);
@@ -78,6 +82,9 @@ public function testEvaluateException($helperMethod, $expectedExceptionMessage)
$this->_model->evaluate($input);
}
+ /**
+ * @return array
+ */
public function evaluateExceptionDataProvider()
{
$nonExistingHelper = __CLASS__ . '::non_existing';
diff --git a/lib/internal/Magento/Framework/View/Test/Unit/Layout/Argument/Interpreter/NamedParamsTest.php b/lib/internal/Magento/Framework/View/Test/Unit/Layout/Argument/Interpreter/NamedParamsTest.php
index f9ad4d387c991..857ca1a7c496f 100644
--- a/lib/internal/Magento/Framework/View/Test/Unit/Layout/Argument/Interpreter/NamedParamsTest.php
+++ b/lib/internal/Magento/Framework/View/Test/Unit/Layout/Argument/Interpreter/NamedParamsTest.php
@@ -64,6 +64,9 @@ public function testEvaluateWrongParam($input, $expectedExceptionMessage)
$this->_model->evaluate($input);
}
+ /**
+ * @return array
+ */
public function evaluateWrongParamDataProvider()
{
return [
diff --git a/lib/internal/Magento/Framework/View/Test/Unit/Layout/Argument/Interpreter/ObjectTest.php b/lib/internal/Magento/Framework/View/Test/Unit/Layout/Argument/Interpreter/ObjectTest.php
index 1d7232d7ada41..89b7bd7c27982 100644
--- a/lib/internal/Magento/Framework/View/Test/Unit/Layout/Argument/Interpreter/ObjectTest.php
+++ b/lib/internal/Magento/Framework/View/Test/Unit/Layout/Argument/Interpreter/ObjectTest.php
@@ -67,6 +67,9 @@ function ($className) use ($self) {
$this->_model->evaluate($input);
}
+ /**
+ * @return array
+ */
public function evaluateWrongClassDataProvider()
{
return [
diff --git a/lib/internal/Magento/Framework/View/Test/Unit/Layout/Argument/Interpreter/OptionsTest.php b/lib/internal/Magento/Framework/View/Test/Unit/Layout/Argument/Interpreter/OptionsTest.php
index 51b34ea810662..b8a924ef93cd7 100644
--- a/lib/internal/Magento/Framework/View/Test/Unit/Layout/Argument/Interpreter/OptionsTest.php
+++ b/lib/internal/Magento/Framework/View/Test/Unit/Layout/Argument/Interpreter/OptionsTest.php
@@ -71,6 +71,9 @@ public function testEvaluateWrongModel($input, $expectedException, $expectedExce
$this->_model->evaluate($input);
}
+ /**
+ * @return array
+ */
public function evaluateWrongModelDataProvider()
{
return [
diff --git a/lib/internal/Magento/Framework/View/Test/Unit/Layout/BuilderFactoryTest.php b/lib/internal/Magento/Framework/View/Test/Unit/Layout/BuilderFactoryTest.php
index 8d615441399b0..89a32603fe670 100644
--- a/lib/internal/Magento/Framework/View/Test/Unit/Layout/BuilderFactoryTest.php
+++ b/lib/internal/Magento/Framework/View/Test/Unit/Layout/BuilderFactoryTest.php
@@ -65,6 +65,9 @@ public function testCreate($type, $arguments, $layoutBuilderClass)
$this->buildFactory->create($type, $arguments);
}
+ /**
+ * @return array
+ */
public function createDataProvider()
{
return [
diff --git a/lib/internal/Magento/Framework/View/Test/Unit/Layout/ElementTest.php b/lib/internal/Magento/Framework/View/Test/Unit/Layout/ElementTest.php
index 70daa9676685d..86968293fa988 100644
--- a/lib/internal/Magento/Framework/View/Test/Unit/Layout/ElementTest.php
+++ b/lib/internal/Magento/Framework/View/Test/Unit/Layout/ElementTest.php
@@ -20,6 +20,9 @@ public function testGetElementName($xml, $name)
$this->assertEquals($name, $model->getElementName());
}
+ /**
+ * @return array
+ */
public function elementNameDataProvider()
{
return [
@@ -31,6 +34,9 @@ public function elementNameDataProvider()
];
}
+ /**
+ * @return array
+ */
public function cacheableDataProvider()
{
return [
diff --git a/lib/internal/Magento/Framework/View/Test/Unit/Layout/Reader/UiComponentTest.php b/lib/internal/Magento/Framework/View/Test/Unit/Layout/Reader/UiComponentTest.php
index a0646ff365a8b..12cdb16e0d9b1 100644
--- a/lib/internal/Magento/Framework/View/Test/Unit/Layout/Reader/UiComponentTest.php
+++ b/lib/internal/Magento/Framework/View/Test/Unit/Layout/Reader/UiComponentTest.php
@@ -77,6 +77,9 @@ public function testInterpret($element)
$this->model->interpret($this->context, $element);
}
+ /**
+ * @return array
+ */
public function interpretDataProvider()
{
return [
diff --git a/lib/internal/Magento/Framework/View/Test/Unit/Page/ConfigTest.php b/lib/internal/Magento/Framework/View/Test/Unit/Page/ConfigTest.php
index 6f4bf8da7bb57..4862816a9efe6 100644
--- a/lib/internal/Magento/Framework/View/Test/Unit/Page/ConfigTest.php
+++ b/lib/internal/Magento/Framework/View/Test/Unit/Page/ConfigTest.php
@@ -282,6 +282,9 @@ public function testAddPageAsset($file, $properties, $name, $expectedName)
);
}
+ /**
+ * @return array
+ */
public function pageAssetDataProvider()
{
return [
@@ -321,6 +324,9 @@ public function testAddRemotePageAsset($url, $contentType, $properties, $name, $
);
}
+ /**
+ * @return array
+ */
public function remotePageAssetDataProvider()
{
return [
@@ -377,6 +383,9 @@ public function testElementAttribute($elementType, $attribute, $value)
$this->assertEquals($value, $this->model->getElementAttribute($elementType, $attribute));
}
+ /**
+ * @return array
+ */
public function elementAttributeDataProvider()
{
return [
@@ -411,6 +420,9 @@ public function testElementAttributeException($elementType, $attribute, $value)
$this->model->setElementAttribute($elementType, $attribute, $value);
}
+ /**
+ * @return array
+ */
public function elementAttributeExceptionDataProvider()
{
return [
@@ -446,6 +458,9 @@ public function testElementAttributes($elementType, $attributes)
$this->assertEquals($attributes, $this->model->getElementAttributes($elementType));
}
+ /**
+ * @return array
+ */
public function elementAttributesDataProvider()
{
return [
@@ -470,6 +485,9 @@ public function testPageLayout($handle)
$this->assertEquals($handle, $this->model->getPageLayout());
}
+ /**
+ * @return array
+ */
public function pageLayoutDataProvider()
{
return [
@@ -530,6 +548,9 @@ public function testGetIncludes($isAvailable, $result)
$this->assertEquals($result, $model->getIncludes());
}
+ /**
+ * @return array
+ */
public function getIncludesDataProvider()
{
return [
diff --git a/lib/internal/Magento/Framework/Webapi/Rest/Response/FieldsFilter.php b/lib/internal/Magento/Framework/Webapi/Rest/Response/FieldsFilter.php
index 75a18dab6b2a7..327b7af93e62b 100644
--- a/lib/internal/Magento/Framework/Webapi/Rest/Response/FieldsFilter.php
+++ b/lib/internal/Magento/Framework/Webapi/Rest/Response/FieldsFilter.php
@@ -104,9 +104,9 @@ protected function parse($filterString)
}
switch ($filterString[$position]) {
case '[':
- array_push($parent, $currentElement);
+ $parent[] = $currentElement;
// push current field in stack and initialize current
- array_push($stack, $current);
+ $stack[] = $current;
$current = [];
break;
diff --git a/lib/internal/Magento/Framework/Webapi/Test/Unit/RequestTest.php b/lib/internal/Magento/Framework/Webapi/Test/Unit/RequestTest.php
index 212477a2e0bdc..a03a18ac33fe7 100644
--- a/lib/internal/Magento/Framework/Webapi/Test/Unit/RequestTest.php
+++ b/lib/internal/Magento/Framework/Webapi/Test/Unit/RequestTest.php
@@ -38,6 +38,9 @@ public function testGetRequestedServicesSuccess($requestParamServices, $expected
$this->assertEquals($expectedResult, $this->request->getRequestedServices());
}
+ /**
+ * @return array
+ */
public function providerTestGetRequestedServicesSuccess()
{
$testModuleA = 'testModule1AllSoapAndRestV1';
diff --git a/lib/internal/Magento/Framework/Webapi/Test/Unit/ServiceInputProcessorTest.php b/lib/internal/Magento/Framework/Webapi/Test/Unit/ServiceInputProcessorTest.php
index 94c9d9cebdc79..7ddf86edec540 100644
--- a/lib/internal/Magento/Framework/Webapi/Test/Unit/ServiceInputProcessorTest.php
+++ b/lib/internal/Magento/Framework/Webapi/Test/Unit/ServiceInputProcessorTest.php
@@ -518,6 +518,9 @@ public function testCustomAttributesExceptions($inputData)
);
}
+ /**
+ * @return array
+ */
public function invalidCustomAttributesDataProvider()
{
return [
diff --git a/lib/web/mage/calendar.js b/lib/web/mage/calendar.js
index 11186b5761efd..de4292b56e684 100644
--- a/lib/web/mage/calendar.js
+++ b/lib/web/mage/calendar.js
@@ -238,12 +238,14 @@
firstDay = parseInt(this._get(inst, 'firstDay'), 10);
firstDay = isNaN(firstDay) ? 0 : firstDay;
- for (row; row < numMonths[0]; row++) {
+ for (row = 0; row < numMonths[0]; row++) {
this.maxRows = 4;
- for (col; col < numMonths[1]; col++) {
+ for (col = 0; col < numMonths[1]; col++) {
selectedDate = this._daylightSavingAdjust(new Date(drawYear, drawMonth, inst.selectedDay));
+ calender = '';
+
if (isMultiMonth) {
calender += '' + this._get(inst, 'weekHeader') + '' : '';
- for (dow; dow < 7; dow++) { // days of the week
+ for (dow = 0; dow < 7; dow++) { // days of the week
day = (dow + firstDay) % 7;
thead += '
= 5 ?
' class="ui-datepicker-week-end"' : '') + '>' +
@@ -291,7 +293,7 @@
this.maxRows = numRows;
printDate = this._daylightSavingAdjust(new Date(drawYear, drawMonth, 1 - leadDays));
- for (dRow; dRow < numRows; dRow++) { // create date picker rows
+ for (dRow = 0; dRow < numRows; dRow++) { // create date picker rows
calender += ' | ';
tbody = !showWeek ? '' : '| ' +
this._get(inst, 'calculateWeek')(printDate) + ' | ';
diff --git a/setup/src/Magento/Setup/Module/Dependency/Circular.php b/setup/src/Magento/Setup/Module/Dependency/Circular.php
index 8f5bd8716f650..a10d2752fa410 100644
--- a/setup/src/Magento/Setup/Module/Dependency/Circular.php
+++ b/setup/src/Magento/Setup/Module/Dependency/Circular.php
@@ -118,7 +118,7 @@ protected function buildCircular($modules)
return;
}
$this->circularDependencies[$path] = $modules;
- array_push($modules, array_shift($modules));
+ $modules[] = array_shift($modules);
$this->buildCircular($modules);
}
@@ -133,7 +133,7 @@ protected function divideByModules($circularDependencies)
$dependenciesByModule = [];
foreach ($circularDependencies as $circularDependency) {
$module = $circularDependency[0];
- array_push($circularDependency, $module);
+ $circularDependency[] = $module;
$dependenciesByModule[$module][] = $circularDependency;
}
diff --git a/setup/src/Magento/Setup/Module/Di/Code/Scanner/XmlInterceptorScanner.php b/setup/src/Magento/Setup/Module/Di/Code/Scanner/XmlInterceptorScanner.php
index e88ca9197096a..75c6e1144e8d2 100644
--- a/setup/src/Magento/Setup/Module/Di/Code/Scanner/XmlInterceptorScanner.php
+++ b/setup/src/Magento/Setup/Module/Di/Code/Scanner/XmlInterceptorScanner.php
@@ -42,9 +42,9 @@ protected function _collectEntitiesFromString($content)
$attributes = $entityNode->attributes;
$type = $attributes->getNamedItem('type');
if ($type !== null) {
- array_push($output, $type->nodeValue);
+ $output[] = $type->nodeValue;
} else {
- array_push($output, $attributes->getNamedItem('name')->nodeValue);
+ $output[] = $attributes->getNamedItem('name')->nodeValue;
}
}
return $output;
@@ -80,7 +80,7 @@ protected function _filterEntities(array $output)
$this->_handleControllerClassName($entityName);
}
if (class_exists($entityName) || interface_exists($entityName)) {
- array_push($filteredEntities, $entityName . '\\Interceptor');
+ $filteredEntities[] = $entityName . '\\Interceptor';
}
}
return $filteredEntities;
diff --git a/setup/src/Magento/Setup/Module/Di/Code/Scanner/XmlScanner.php b/setup/src/Magento/Setup/Module/Di/Code/Scanner/XmlScanner.php
index 6a798f3226570..39d764cc32ce8 100644
--- a/setup/src/Magento/Setup/Module/Di/Code/Scanner/XmlScanner.php
+++ b/setup/src/Magento/Setup/Module/Di/Code/Scanner/XmlScanner.php
@@ -72,7 +72,7 @@ protected function _filterEntities(array $output)
}
if (false === $isClassExists) {
if (class_exists($entityName) || interface_exists($entityName)) {
- array_push($filteredEntities, $className);
+ $filteredEntities[] = $className;
} else {
$this->_log->add(
\Magento\Setup\Module\Di\Compiler\Log\Log::CONFIGURATION_ERROR,
diff --git a/setup/src/Magento/Setup/Test/Unit/Console/Command/DbStatusCommandTest.php b/setup/src/Magento/Setup/Test/Unit/Console/Command/DbStatusCommandTest.php
index c8ffd5ea47b02..3246a43c10189 100644
--- a/setup/src/Magento/Setup/Test/Unit/Console/Command/DbStatusCommandTest.php
+++ b/setup/src/Magento/Setup/Test/Unit/Console/Command/DbStatusCommandTest.php
@@ -60,6 +60,9 @@ public function testExecute(array $outdatedInfo, $expectedMessage)
$this->assertStringMatchesFormat($expectedMessage, $tester->getDisplay());
}
+ /**
+ * @return array
+ */
public function executeDataProvider()
{
return [
diff --git a/setup/src/Magento/Setup/Test/Unit/Console/Command/UninstallCommandTest.php b/setup/src/Magento/Setup/Test/Unit/Console/Command/UninstallCommandTest.php
index 21fa10379a751..d51e3c40d1058 100644
--- a/setup/src/Magento/Setup/Test/Unit/Console/Command/UninstallCommandTest.php
+++ b/setup/src/Magento/Setup/Test/Unit/Console/Command/UninstallCommandTest.php
@@ -51,6 +51,9 @@ public function testExecuteInteractionNo()
$this->checkInteraction(false);
}
+ /**
+ * @param $answer
+ */
public function checkInteraction($answer)
{
$question = $this->getMock('Symfony\Component\Console\Helper\QuestionHelper', [], [], '', false);
diff --git a/setup/src/Magento/Setup/Test/Unit/Console/CompilerPreparationTest.php b/setup/src/Magento/Setup/Test/Unit/Console/CompilerPreparationTest.php
index 979407662aaf1..69263497fd6c4 100644
--- a/setup/src/Magento/Setup/Test/Unit/Console/CompilerPreparationTest.php
+++ b/setup/src/Magento/Setup/Test/Unit/Console/CompilerPreparationTest.php
@@ -74,6 +74,9 @@ public function testClearGenerationDirWhenNeeded($commandName, $isCompileCommand
$this->model->handleCompilerEnvironment();
}
+ /**
+ * @return array
+ */
public function commandNameDataProvider()
{
return [
diff --git a/setup/src/Magento/Setup/Test/Unit/Model/ConfigOptionsListTest.php b/setup/src/Magento/Setup/Test/Unit/Model/ConfigOptionsListTest.php
index 0b2bd10fd0f50..7e8872def5da4 100644
--- a/setup/src/Magento/Setup/Test/Unit/Model/ConfigOptionsListTest.php
+++ b/setup/src/Magento/Setup/Test/Unit/Model/ConfigOptionsListTest.php
@@ -169,6 +169,9 @@ public function testValidateCacheHosts($hosts, $expectedError)
}
+ /**
+ * @return array
+ */
public function validateCacheHostsDataProvider()
{
return [
diff --git a/setup/src/Magento/Setup/Test/Unit/Model/Cron/JobComponentUninstallTest.php b/setup/src/Magento/Setup/Test/Unit/Model/Cron/JobComponentUninstallTest.php
index f1b27407af851..e766fd42cbcf8 100644
--- a/setup/src/Magento/Setup/Test/Unit/Model/Cron/JobComponentUninstallTest.php
+++ b/setup/src/Magento/Setup/Test/Unit/Model/Cron/JobComponentUninstallTest.php
@@ -282,6 +282,9 @@ public function testExecuteWrongFormat(array $params)
$this->job->execute();
}
+ /**
+ * @return array
+ */
public function executeWrongFormatDataProvider()
{
return [
diff --git a/setup/src/Magento/Setup/Test/Unit/Model/Cron/JobFactoryTest.php b/setup/src/Magento/Setup/Test/Unit/Model/Cron/JobFactoryTest.php
index 00d53368e50de..3fe5836c086c9 100644
--- a/setup/src/Magento/Setup/Test/Unit/Model/Cron/JobFactoryTest.php
+++ b/setup/src/Magento/Setup/Test/Unit/Model/Cron/JobFactoryTest.php
@@ -206,16 +206,25 @@ public function testMaintenanceModeDisable()
// functions to override native php functions
namespace Magento\Setup\Model\Cron;
+/**
+ * @return string
+ */
function fopen()
{
return 'filestream';
}
+/**
+ * @return bool
+ */
function is_resource()
{
return true;
}
+/**
+ * @return string
+ */
function get_resource_type()
{
return 'stream';
diff --git a/setup/src/Magento/Setup/Test/Unit/Model/Cron/ReadinessCheckTest.php b/setup/src/Magento/Setup/Test/Unit/Model/Cron/ReadinessCheckTest.php
index a415378a32854..7919f773ebe0a 100644
--- a/setup/src/Magento/Setup/Test/Unit/Model/Cron/ReadinessCheckTest.php
+++ b/setup/src/Magento/Setup/Test/Unit/Model/Cron/ReadinessCheckTest.php
@@ -202,6 +202,9 @@ public function testRunReadinessCheckLastTimestamp()
namespace Magento\Setup\Model\Cron;
+/**
+ * @return int
+ */
function time()
{
return 100;
diff --git a/setup/src/Magento/Setup/Test/Unit/Model/Description/Mixin/BrakeMixinTest.php b/setup/src/Magento/Setup/Test/Unit/Model/Description/Mixin/BrakeMixinTest.php
index 0da08d41feb4e..d36cba0b80dcc 100644
--- a/setup/src/Magento/Setup/Test/Unit/Model/Description/Mixin/BrakeMixinTest.php
+++ b/setup/src/Magento/Setup/Test/Unit/Model/Description/Mixin/BrakeMixinTest.php
@@ -25,6 +25,9 @@ public function testApply($subject, $expectedResult)
$this->assertEquals($expectedResult, $this->mixin->apply($subject));
}
+ /**
+ * @return array
+ */
public function getTestData()
{
return [
diff --git a/setup/src/Magento/Setup/Test/Unit/Model/Description/Mixin/HeaderMixinTest.php b/setup/src/Magento/Setup/Test/Unit/Model/Description/Mixin/HeaderMixinTest.php
index f603937c26570..c2a8886e79a7b 100644
--- a/setup/src/Magento/Setup/Test/Unit/Model/Description/Mixin/HeaderMixinTest.php
+++ b/setup/src/Magento/Setup/Test/Unit/Model/Description/Mixin/HeaderMixinTest.php
@@ -25,6 +25,9 @@ public function testApply($subject, $expectedResult)
$this->assertEquals($expectedResult, $this->mixin->apply($subject));
}
+ /**
+ * @return array
+ */
public function getTestData()
{
return [
diff --git a/setup/src/Magento/Setup/Test/Unit/Model/Description/Mixin/Helper/RandomWordSelectorTest.php b/setup/src/Magento/Setup/Test/Unit/Model/Description/Mixin/Helper/RandomWordSelectorTest.php
index f9aa4a09fa9a8..3e6108e43b716 100644
--- a/setup/src/Magento/Setup/Test/Unit/Model/Description/Mixin/Helper/RandomWordSelectorTest.php
+++ b/setup/src/Magento/Setup/Test/Unit/Model/Description/Mixin/Helper/RandomWordSelectorTest.php
@@ -34,6 +34,9 @@ public function testRandomSelector($fixtureSource, $fixtureCount)
}
}
+ /**
+ * @return array
+ */
public function getTestData()
{
return [
diff --git a/setup/src/Magento/Setup/Test/Unit/Model/Description/Mixin/Helper/WordWrapperTest.php b/setup/src/Magento/Setup/Test/Unit/Model/Description/Mixin/Helper/WordWrapperTest.php
index df34973e2c1fa..736a03cde9aa2 100644
--- a/setup/src/Magento/Setup/Test/Unit/Model/Description/Mixin/Helper/WordWrapperTest.php
+++ b/setup/src/Magento/Setup/Test/Unit/Model/Description/Mixin/Helper/WordWrapperTest.php
@@ -30,6 +30,9 @@ public function testWrapping($inputData, $expectedResult)
);
}
+ /**
+ * @return array
+ */
public function getTestData()
{
return [
diff --git a/setup/src/Magento/Setup/Test/Unit/Model/Description/Mixin/ParagraphMixinTest.php b/setup/src/Magento/Setup/Test/Unit/Model/Description/Mixin/ParagraphMixinTest.php
index 0c2c7b3d89717..3e1d65242d545 100644
--- a/setup/src/Magento/Setup/Test/Unit/Model/Description/Mixin/ParagraphMixinTest.php
+++ b/setup/src/Magento/Setup/Test/Unit/Model/Description/Mixin/ParagraphMixinTest.php
@@ -25,6 +25,9 @@ public function testApply($subject, $expectedResult)
$this->assertEquals($expectedResult, $this->mixin->apply($subject));
}
+ /**
+ * @return array
+ */
public function getTestData()
{
return [
diff --git a/setup/src/Magento/Setup/Test/Unit/Model/Grid/TypeMapperTest.php b/setup/src/Magento/Setup/Test/Unit/Model/Grid/TypeMapperTest.php
index 3033182d29623..ebf203f729145 100644
--- a/setup/src/Magento/Setup/Test/Unit/Model/Grid/TypeMapperTest.php
+++ b/setup/src/Magento/Setup/Test/Unit/Model/Grid/TypeMapperTest.php
@@ -39,6 +39,9 @@ public function testMap($packageType, $expected)
);
}
+ /**
+ * @return array
+ */
public function mapDataProvider()
{
return [
diff --git a/setup/src/Magento/Setup/Test/Unit/Model/ObjectManagerProviderTest.php b/setup/src/Magento/Setup/Test/Unit/Model/ObjectManagerProviderTest.php
index 755821ea0a557..dadc2bdcf51c9 100644
--- a/setup/src/Magento/Setup/Test/Unit/Model/ObjectManagerProviderTest.php
+++ b/setup/src/Magento/Setup/Test/Unit/Model/ObjectManagerProviderTest.php
@@ -83,6 +83,9 @@ public function testGet()
$this->assertInstanceOf(ObjectManagerInterface::class, $this->model->get());
}
+ /**
+ * @return mixed
+ */
private function getCommandListMock()
{
$commandMock = $this->getMockBuilder(Command::class)->disableOriginalConstructor()->getMock();
diff --git a/setup/src/Magento/Setup/Test/Unit/Model/PayloadValidatorTest.php b/setup/src/Magento/Setup/Test/Unit/Model/PayloadValidatorTest.php
index ee27ce7b449ee..59fcc6c7c97cf 100644
--- a/setup/src/Magento/Setup/Test/Unit/Model/PayloadValidatorTest.php
+++ b/setup/src/Magento/Setup/Test/Unit/Model/PayloadValidatorTest.php
@@ -38,6 +38,9 @@ public function testValidatePayLoad($type, $has, $moduleExists)
$this->assertEquals('', $this->model->validatePayload($type));
}
+ /**
+ * @return array
+ */
public function validatePayLoadDataProvider()
{
return [
@@ -61,6 +64,9 @@ public function testValidatePayLoadNegativeCases($type, $has, $moduleExists, $er
$this->assertStringStartsWith($errorMessage, $this->model->validatePayload($type));
}
+ /**
+ * @return array
+ */
public function validatePayLoadNegativeCasesDataProvider()
{
return [
diff --git a/setup/src/Magento/Setup/Test/Unit/Model/PhpReadinessCheckTest.php b/setup/src/Magento/Setup/Test/Unit/Model/PhpReadinessCheckTest.php
index 5c2ad73de9da0..115578d1d108b 100644
--- a/setup/src/Magento/Setup/Test/Unit/Model/PhpReadinessCheckTest.php
+++ b/setup/src/Magento/Setup/Test/Unit/Model/PhpReadinessCheckTest.php
@@ -394,6 +394,10 @@ protected function isPhp7OrHhvm()
namespace Magento\Setup\Model;
+/**
+ * @param $param
+ * @return int|string
+ */
function ini_get($param)
{
if ($param === 'xdebug.max_nesting_level') {
diff --git a/setup/src/Magento/Setup/Test/Unit/Model/WebLoggerTest.php b/setup/src/Magento/Setup/Test/Unit/Model/WebLoggerTest.php
index e85b3fcaf88c9..0f10566d27459 100644
--- a/setup/src/Magento/Setup/Test/Unit/Model/WebLoggerTest.php
+++ b/setup/src/Magento/Setup/Test/Unit/Model/WebLoggerTest.php
@@ -184,6 +184,9 @@ public function testClearNotExist()
$this->webLogger->clear();
}
+ /**
+ * @return string
+ */
public static function readLog()
{
return self::$log;
@@ -202,6 +205,9 @@ public static function deleteLog()
self::$log = '';
}
+ /**
+ * @return bool
+ */
public static function isExist()
{
return self::$log != '';
diff --git a/setup/src/Magento/Setup/Test/Unit/Module/Di/Code/Reader/ClassReaderDecoratorTest.php b/setup/src/Magento/Setup/Test/Unit/Module/Di/Code/Reader/ClassReaderDecoratorTest.php
index df517f97ec89c..66a4d784170ad 100644
--- a/setup/src/Magento/Setup/Test/Unit/Module/Di/Code/Reader/ClassReaderDecoratorTest.php
+++ b/setup/src/Magento/Setup/Test/Unit/Module/Di/Code/Reader/ClassReaderDecoratorTest.php
@@ -46,6 +46,9 @@ public function testGetConstructor($expectation, $className, $willReturn)
);
}
+ /**
+ * @return array
+ */
public function getConstructorDataProvider()
{
return [
diff --git a/setup/src/Magento/Setup/Test/Unit/Module/Di/_files/app/code/Magento/SomeModule/Helper/Test.php b/setup/src/Magento/Setup/Test/Unit/Module/Di/_files/app/code/Magento/SomeModule/Helper/Test.php
index 2738e50b7eef9..696c4f5af7b12 100644
--- a/setup/src/Magento/Setup/Test/Unit/Module/Di/_files/app/code/Magento/SomeModule/Helper/Test.php
+++ b/setup/src/Magento/Setup/Test/Unit/Module/Di/_files/app/code/Magento/SomeModule/Helper/Test.php
@@ -25,6 +25,12 @@ class Test
*/
protected $_newElementFactory;
+ /**
+ * Test constructor.
+ * @param \Magento\SomeModule\Module\Factory $factory
+ * @param \Magento\SomeModule\Element\Factory $elementFactory
+ * @param \Magento\SomeModule\ElementFactory $rightElementFactory
+ */
public function __construct(
\Magento\SomeModule\Module\Factory $factory,
\Magento\SomeModule\Element\Factory $elementFactory,
diff --git a/setup/src/Magento/Setup/Test/Unit/Module/I18n/Parser/AbstractParserTest.php b/setup/src/Magento/Setup/Test/Unit/Module/I18n/Parser/AbstractParserTest.php
index 72ea95f99778f..53b72614c3357 100644
--- a/setup/src/Magento/Setup/Test/Unit/Module/I18n/Parser/AbstractParserTest.php
+++ b/setup/src/Magento/Setup/Test/Unit/Module/I18n/Parser/AbstractParserTest.php
@@ -35,6 +35,9 @@ public function testValidateOptions($options, $message)
$this->_parserMock->parse($options);
}
+ /**
+ * @return array
+ */
public function dataProviderForValidateOptions()
{
return [
diff --git a/setup/src/Magento/Setup/Test/Unit/Module/Setup/SetupCacheTest.php b/setup/src/Magento/Setup/Test/Unit/Module/Setup/SetupCacheTest.php
index 7e43aa9076dd7..d2d6abe55ff98 100644
--- a/setup/src/Magento/Setup/Test/Unit/Module/Setup/SetupCacheTest.php
+++ b/setup/src/Magento/Setup/Test/Unit/Module/Setup/SetupCacheTest.php
@@ -88,6 +88,9 @@ public function testHas($table, $parentId, $rowId, $field, $expected)
$this->assertSame($expected, $this->object->has($table, $parentId, $rowId, $field));
}
+ /**
+ * @return array
+ */
public function hasDataProvider()
{
return [
diff --git a/setup/src/Magento/Setup/Test/Unit/Mvc/Bootstrap/InitParamListenerTest.php b/setup/src/Magento/Setup/Test/Unit/Mvc/Bootstrap/InitParamListenerTest.php
index 88ff6c994e2d7..2492318d45bc1 100644
--- a/setup/src/Magento/Setup/Test/Unit/Mvc/Bootstrap/InitParamListenerTest.php
+++ b/setup/src/Magento/Setup/Test/Unit/Mvc/Bootstrap/InitParamListenerTest.php
@@ -139,6 +139,9 @@ public function testCreateService($zfAppConfig, $env, $cliParam, $expectedArray)
$this->assertEquals($expectedArray, $listener->createService($serviceLocator));
}
+ /**
+ * @return array
+ */
public function createServiceDataProvider()
{
return [