Skip to content

Commit f8a3a28

Browse files
committed
MC-33069: Stabilize Unit tests
1 parent 344fe35 commit f8a3a28

File tree

5 files changed

+12
-5
lines changed

5 files changed

+12
-5
lines changed

app/code/Magento/PageCache/Controller/Block/Render.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,9 @@
66
*/
77
namespace Magento\PageCache\Controller\Block;
88

9-
class Render extends \Magento\PageCache\Controller\Block
9+
use Magento\Framework\App\Action\HttpGetActionInterface;
10+
11+
class Render extends \Magento\PageCache\Controller\Block implements HttpGetActionInterface
1012
{
1113
/**
1214
* Returns block content depends on ajax request

lib/internal/Magento/Framework/Archive/Tar.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
class Tar extends \Magento\Framework\Archive\AbstractArchive implements \Magento\Framework\Archive\ArchiveInterface
1717
{
1818
/**
19-
* Tar block size
19+
* Define acceptable tar block size.
2020
*
2121
* @const int
2222
*/

lib/internal/Magento/Framework/View/Helper/PathPattern.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ public function translatePatternFromGlob($path)
3939
protected function translateGroupsFromGlob($pattern)
4040
{
4141
preg_match_all('~\\\\\\{[^,\\}]+(?:,[^,\\}]*)*\\\\\\}~', $pattern, $matches, PREG_OFFSET_CAPTURE);
42-
for ($index = count($matches[0]) - 1; $index >= 0; $index -= 1) {
42+
for ($index = count($matches[0]) - 1; $index >= 0; --$index) {
4343
list($match, $offset) = $matches[0][$index];
4444
$replacement = substr_replace($match, '(?:', 0, 2);
4545
$replacement = substr_replace($replacement, ')', -2);
@@ -65,7 +65,7 @@ protected function translateGroupsFromGlob($pattern)
6565
protected function translateCharacterGroupsFromGlob($pattern)
6666
{
6767
preg_match_all('~\\\\\\[(\\\\\\!)?[^\\]]+\\\\\\]~i', $pattern, $matches, PREG_OFFSET_CAPTURE);
68-
for ($index = count($matches[0]) - 1; $index >= 0; $index -= 1) {
68+
for ($index = count($matches[0]) - 1; $index >= 0; --$index) {
6969
list($match, $offset) = $matches[0][$index];
7070
$exclude = !empty($matches[1][$index][0]);
7171
$replacement = substr_replace($match, '[' . ($exclude ? '^' : ''), 0, $exclude ? 4 : 2);

setup/src/Magento/Setup/Fixtures/Quote/QuoteGenerator.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -583,7 +583,7 @@ private function prepareQueryTemplates()
583583
* @param array $replacements
584584
* @return void
585585
*/
586-
protected function query($table, ... $replacements)
586+
protected function query($table, ...$replacements)
587587
{
588588
$query = $this->queryTemplates[$table];
589589
foreach ($replacements as $data) {

setup/src/Magento/Setup/Test/Unit/Model/Customer/CustomerDataGeneratorTest.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,11 @@ class CustomerDataGeneratorTest extends TestCase
4040
*/
4141
private $customerGenerator;
4242

43+
/**
44+
* @var CollectionFactory|MockObject
45+
*/
46+
private $groupCollectionFactoryMock;
47+
4348
protected function setUp(): void
4449
{
4550
$this->groupCollectionFactoryMock = $this->getMockBuilder(CollectionFactory::class)

0 commit comments

Comments
 (0)