You are here

public function OgGroupResolverTestBase::testStopPropagation in Organic groups 8

Tests if the plugin is able to stop the group resolving process.

@covers ::isPropagationStopped @covers ::stopPropagation

File

tests/src/Unit/Plugin/OgGroupResolver/OgGroupResolverTestBase.php, line 130

Class

OgGroupResolverTestBase
Base class for testing OgGroupResolver plugins.

Namespace

Drupal\Tests\og\Unit\Plugin\OgGroupResolver

Code

public function testStopPropagation() {
  $plugin = $this
    ->getPluginInstance();

  // Initially propagation should not be stopped.
  $this
    ->assertFalse($plugin
    ->isPropagationStopped());

  // Test if propagation can be stopped.
  $plugin
    ->stopPropagation();
  $this
    ->assertTrue($plugin
    ->isPropagationStopped());
}