Unverified Commit f35ef741 authored by alexpott's avatar alexpott
Browse files

Issue #2982983 by svetoslav.dragoev, John Cook: Batch Builder tests in the wrong location

parent 71b9219f
<?php
namespace Drupal\Tests\system\Unit\Batch;
namespace Drupal\Tests\Core\Batch;
use Drupal\Core\Batch\BatchBuilder;
use Drupal\Core\StringTranslation\TranslatableMarkup;
......@@ -64,10 +64,10 @@ public function testSetTitle() {
*/
public function testSetFinishCallback() {
$batch = (new BatchBuilder())
->setFinishCallback('\Drupal\Tests\system\Unit\Batch\BatchBuilderTest::finishedCallback')
->setFinishCallback('\Drupal\Tests\Core\Batch\BatchBuilderTest::finishedCallback')
->toArray();
$this->assertEquals('\Drupal\Tests\system\Unit\Batch\BatchBuilderTest::finishedCallback', $batch['finished']);
$this->assertEquals('\Drupal\Tests\Core\Batch\BatchBuilderTest::finishedCallback', $batch['finished']);
}
/**
......@@ -216,22 +216,22 @@ public function testSetUrlOptions() {
public function testAddOperation() {
$batch_builder = new BatchBuilder();
$batch = $batch_builder
->addOperation('\Drupal\Tests\system\Unit\Batch\BatchBuilderTest::operationCallback')
->addOperation('\Drupal\Tests\Core\Batch\BatchBuilderTest::operationCallback')
->toArray();
$this->assertEquals([
['\Drupal\Tests\system\Unit\Batch\BatchBuilderTest::operationCallback', []],
['\Drupal\Tests\Core\Batch\BatchBuilderTest::operationCallback', []],
], $batch['operations']);
$batch = $batch_builder
->addOperation('\Drupal\Tests\system\Unit\Batch\BatchBuilderTest::operationCallback', [2])
->addOperation('\Drupal\Tests\system\Unit\Batch\BatchBuilderTest::operationCallback', [3])
->addOperation('\Drupal\Tests\Core\Batch\BatchBuilderTest::operationCallback', [2])
->addOperation('\Drupal\Tests\Core\Batch\BatchBuilderTest::operationCallback', [3])
->toArray();
$this->assertEquals([
['\Drupal\Tests\system\Unit\Batch\BatchBuilderTest::operationCallback', []],
['\Drupal\Tests\system\Unit\Batch\BatchBuilderTest::operationCallback', [2]],
['\Drupal\Tests\system\Unit\Batch\BatchBuilderTest::operationCallback', [3]],
['\Drupal\Tests\Core\Batch\BatchBuilderTest::operationCallback', []],
['\Drupal\Tests\Core\Batch\BatchBuilderTest::operationCallback', [2]],
['\Drupal\Tests\Core\Batch\BatchBuilderTest::operationCallback', [3]],
], $batch['operations']);
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment