You are here

public function MachineNameTest::testInvalidConfiguration in Drupal 10

Same name and namespace in other branches
  1. 9 core/modules/migrate/tests/src/Unit/process/MachineNameTest.php \Drupal\Tests\migrate\Unit\process\MachineNameTest::testInvalidConfiguration()

Tests that the replacement regular expression is a string.

File

core/modules/migrate/tests/src/Unit/process/MachineNameTest.php, line 96

Class

MachineNameTest
Tests the machine name process plugin.

Namespace

Drupal\Tests\migrate\Unit\process

Code

public function testInvalidConfiguration() : void {
  $configuration['replace_pattern'] = 1;
  $this
    ->expectException(MigrateException::class);
  $this
    ->expectExceptionMessage('The replace pattern should be a string');
  new MachineName($configuration, 'machine_name', [], $this->transliteration);
}