function LanguageNegotiationTest::testStringInput

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

Class

LanguageNegotiationTest
@coversDefaultClass <a href="/api/drupal/core%21modules%21language%21src%21Plugin%21migrate%21process%21LanguageNegotiation.php/class/LanguageNegotiation/11.x" title="Processes the arrays for the language types&#039; negotiation methods and weights." class="local">\Drupal\language\Plugin\migrate\process\LanguageNegotiation</a> @group language

Namespace

Drupal\Tests\language\Unit\process

Code

public function testStringInput() : void {
    $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.