Verified Commit 73a1fb9d authored by quietone's avatar quietone
Browse files

Issue #3464294 by mondrake, smustgrave: Some tests fail with 'Cannot use...

Issue #3464294 by mondrake, smustgrave: Some tests fail with 'Cannot use positional argument after named argument during unpacking'

(cherry picked from commit 4e3be454)
parent 98e24c88
Loading
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -111,11 +111,11 @@ public static function queryDataProvider() {
        ];
      }
      $tests[$data_set]['expected_data'] = $tests[$data_set]['source_data'][$table];
      $tests[$data_set][2] = $num_rows;
      $tests[$data_set]['num_rows'] = $num_rows;
      // Plugin configuration array.
      $tests[$data_set][3] = ['batch_size' => $batch_size];
      $tests[$data_set]['configuration'] = ['batch_size' => $batch_size];
      // Expected batch size.
      $tests[$data_set][4] = $batch_size;
      $tests[$data_set]['expected_batch_size'] = $batch_size;
      // Expected batch count is 0 unless a batch size is set.
      $expected_batch_count = 0;
      if ($batch_size > 0) {
@@ -126,7 +126,7 @@ public static function queryDataProvider() {
          $expected_batch_count++;
        }
      }
      $tests[$data_set][5] = $expected_batch_count;
      $tests[$data_set]['expected_batch_count'] = $expected_batch_count;
      $data_set++;
    }
    return $tests;
+0 −1
Original line number Diff line number Diff line
@@ -103,7 +103,6 @@ public static function providerTestUnpackOptions() {
      'expected' => [
        'key' => 'value2',
      ],
      '',
    ];
    // Set no storage but an options value, so the options value should be kept.
    $test_parameters[] = [
+5 −5
Original line number Diff line number Diff line
@@ -75,11 +75,11 @@ public static function providerTestPercentages() {
      // but for the last pass through, when 500 out of 501 items have been
      // processed, we do not want to round up to 100%, since that would
      // erroneously indicate that the processing is complete.
      ['total' => 1, 'current' => 100 / 501, '20'],
      ['total' => 1, 'current' => 200 / 501, '40'],
      ['total' => 1, 'current' => 300 / 501, '60'],
      ['total' => 1, 'current' => 400 / 501, '80'],
      ['total' => 1, 'current' => 500 / 501, '99.8'],
      ['total' => 1, 'current' => 100 / 501, 'expected_result' => '20'],
      ['total' => 1, 'current' => 200 / 501, 'expected_result' => '40'],
      ['total' => 1, 'current' => 300 / 501, 'expected_result' => '60'],
      ['total' => 1, 'current' => 400 / 501, 'expected_result' => '80'],
      ['total' => 1, 'current' => 500 / 501, 'expected_result' => '99.8'],
    ];
  }