You are here

public function LanguageNegotiationTest::testStringInput in Drupal 10

Same name and namespace in other branches
  1. 8 core/modules/language/tests/src/Unit/process/LanguageNegotiationTest.php \Drupal\Tests\language\Unit\process\LanguageNegotiationTest::testStringInput()
  2. 9 core/modules/language/tests/src/Unit/process/LanguageNegotiationTest.php \Drupal\Tests\language\Unit\process\LanguageNegotiationTest::testStringInput()

Tests string input.

File

core/modules/language/tests/src/Unit/process/LanguageNegotiationTest.php, line 80

Class

LanguageNegotiationTest
@coversDefaultClass \Drupal\language\Plugin\migrate\process\LanguageNegotiation @group language

Namespace

Drupal\Tests\language\Unit\process

Code

public function testStringInput() {
  $this->plugin = new LanguageNegotiation([], 'map', []);
  $this
    ->expectException(MigrateException::class);
  $this
    ->expectExceptionMessage('The input should be an array');
  $this->plugin
    ->transform('foo', $this->migrateExecutable, $this->row, 'destination_property');
}