function ProcessPluginBaseTest::testStopPipeline

Same name in other branches
  1. 10 core/modules/migrate/tests/src/Unit/process/ProcessPluginBaseTest.php \Drupal\Tests\migrate\Unit\process\ProcessPluginBaseTest::testStopPipeline()

Tests stopping the pipeline.

@covers ::isPipelineStopped @covers ::stopPipeline @covers ::reset

File

core/modules/migrate/tests/src/Unit/process/ProcessPluginBaseTest.php, line 26

Class

ProcessPluginBaseTest
Tests the base process plugin class.

Namespace

Drupal\Tests\migrate\Unit\process

Code

public function testStopPipeline() : void {
    $plugin = new ProcessPluginBase([], 'plugin_id', []);
    $this->assertFalse($plugin->isPipelineStopped());
    $stopPipeline = (new \ReflectionClass($plugin))->getMethod('stopPipeline');
    $stopPipeline->invoke($plugin);
    $this->assertTrue($plugin->isPipelineStopped());
    $plugin->reset();
    $this->assertFalse($plugin->isPipelineStopped());
}

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