You are here

public function ServiceTest::testGet in Purge 8.3

Same name in this branch
  1. 8.3 tests/src/Kernel/Processor/ServiceTest.php \Drupal\Tests\purge\Kernel\Processor\ServiceTest::testGet()
  2. 8.3 tests/src/Kernel/Queuer/ServiceTest.php \Drupal\Tests\purge\Kernel\Queuer\ServiceTest::testGet()

Tests \Drupal\purge\Plugin\Purge\Processor\ProcessorsService::get.

File

tests/src/Kernel/Processor/ServiceTest.php, line 47

Class

ServiceTest
Tests \Drupal\purge\Plugin\Purge\Processor\ProcessorsService.

Namespace

Drupal\Tests\purge\Kernel\Processor

Code

public function testGet() : void {
  $this
    ->initializeService();
  $this
    ->assertTrue($this->service
    ->get('a') instanceof ProcessorInterface);
  $this
    ->assertTrue($this->service
    ->get('b') instanceof ProcessorInterface);
  $this
    ->assertFalse($this->service
    ->get('c'));
  $this->service
    ->setPluginsEnabled([
    'c',
  ]);
  $this
    ->assertTrue($this->service
    ->get('c') instanceof ProcessorInterface);
}