function QueryBatchTest::testBatchSizeNonInteger

Same name in other branches
  1. 8.9.x core/modules/migrate/tests/src/Kernel/QueryBatchTest.php \Drupal\Tests\migrate\Kernel\QueryBatchTest::testBatchSizeNonInteger()
  2. 10 core/modules/migrate/tests/src/Kernel/QueryBatchTest.php \Drupal\Tests\migrate\Kernel\QueryBatchTest::testBatchSizeNonInteger()
  3. 11.x core/modules/migrate/tests/src/Kernel/QueryBatchTest.php \Drupal\Tests\migrate\Kernel\QueryBatchTest::testBatchSizeNonInteger()

Tests a non integer batch size throws an exception.

File

core/modules/migrate/tests/src/Kernel/QueryBatchTest.php, line 69

Class

QueryBatchTest
Tests query batching.

Namespace

Drupal\Tests\migrate\Kernel

Code

public function testBatchSizeNonInteger() {
    $this->expectException(MigrateException::class);
    $this->expectExceptionMessage('batch_size must be greater than or equal to zero');
    $plugin = $this->getPlugin([
        'batch_size' => '1',
    ]);
    $plugin->next();
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.