function LanguageNegotiationTest::testStringInput

Same name in other branches
  1. 8.9.x core/modules/language/tests/src/Unit/process/LanguageNegotiationTest.php \Drupal\Tests\language\Unit\process\LanguageNegotiationTest::testStringInput()
  2. 10 core/modules/language/tests/src/Unit/process/LanguageNegotiationTest.php \Drupal\Tests\language\Unit\process\LanguageNegotiationTest::testStringInput()
  3. 11.x 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');
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.