Skip to content

Commit 3fb5eef

Browse files
committed
Merge branch 'pr-857' into imported-magento-magento2-functional-testing-framework-857
2 parents e61fcee + 3ace8dc commit 3fb5eef

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

dev/tests/unit/Magento/FunctionalTestFramework/Util/Sorter/ParallelGroupSorterTest.php

+4-4
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ public function testBasicTestsSplitByTime(): void
6464
public function testTestsAndSuitesSplitByTime(): void
6565
{
6666
// mock tests for test object handler.
67-
$this->createMockForTest(0);
67+
$this->createMockForTest(0, [300, 275]);
6868

6969
// create test to size array
7070
$sampleTestArray = [
@@ -421,17 +421,17 @@ public static function tearDownAfterClass(): void
421421
* Mock test object and test object handler.
422422
*
423423
* @param int $numberOfCalls
424+
* @param array $actionCount
424425
*
425426
* @return void
426427
*/
427-
private function createMockForTest(int $numberOfCalls): void
428+
private function createMockForTest(int $numberOfCalls, array $actionCount = [300, 275, 300, 275]): void
428429
{
429430
$mockTest1 = $this->createMock(TestObject::class);
430431
$mockTest1
431432
->method('getEstimatedDuration')
432433
->willReturnCallback(
433-
function () use (&$numberOfCalls) {
434-
$actionCount = [300, 275, 300, 275];
434+
function () use (&$numberOfCalls, $actionCount) {
435435
$result = $actionCount[$numberOfCalls];
436436
$numberOfCalls++;
437437

0 commit comments

Comments
 (0)