You are here

public function TermMergerTermCrudTest::minimumTermsValidation in Term Merge 8

Tests the form validation for the minimum required input.

@test @dataProvider mergeTermFunctionsProvider

Parameters

string $methodName: The merge method being tested.

string $target: The label for the taxonomy term target.

File

tests/src/Kernel/TermMergerTermCrudTest.php, line 72

Class

TermMergerTermCrudTest
Tests term merging for taxonomy terms.

Namespace

Drupal\Tests\term_merge\Kernel

Code

public function minimumTermsValidation($methodName, $target) {
  $this
    ->expectException('\\RuntimeException', 'You must provide at least 1 term');
  $sut = $this
    ->createSubjectUnderTest();
  $sut
    ->{$methodName}([], $this
    ->prepareTarget($target));
}