You are here

public function ViewExecutableTest::testGenerateHandlerId in Drupal 9

Same name and namespace in other branches
  1. 8 core/modules/views/tests/src/Unit/ViewExecutableTest.php \Drupal\Tests\views\Unit\ViewExecutableTest::testGenerateHandlerId()

@covers ::generateHandlerId

File

core/modules/views/tests/src/Unit/ViewExecutableTest.php, line 344

Class

ViewExecutableTest
@coversDefaultClass \Drupal\views\ViewExecutable @group views

Namespace

Drupal\Tests\views\Unit

Code

public function testGenerateHandlerId() {

  // Test the generateHandlerId() method.
  $test_ids = [
    'test' => 'test',
    'test_1' => 'test_1',
  ];
  $this
    ->assertEquals('new', ViewExecutable::generateHandlerId('new', $test_ids));
  $this
    ->assertEquals('test_2', ViewExecutable::generateHandlerId('test', $test_ids));
}