function LanguageNegotiationTest::testTransformWithoutWeights
Same name in other branches
- 9 core/modules/language/tests/src/Unit/process/LanguageNegotiationTest.php \Drupal\Tests\language\Unit\process\LanguageNegotiationTest::testTransformWithoutWeights()
- 8.9.x core/modules/language/tests/src/Unit/process/LanguageNegotiationTest.php \Drupal\Tests\language\Unit\process\LanguageNegotiationTest::testTransformWithoutWeights()
- 11.x core/modules/language/tests/src/Unit/process/LanguageNegotiationTest.php \Drupal\Tests\language\Unit\process\LanguageNegotiationTest::testTransformWithoutWeights()
Tests successful transformation without weights.
File
-
core/
modules/ language/ tests/ src/ Unit/ process/ LanguageNegotiationTest.php, line 62
Class
- LanguageNegotiationTest
- @coversDefaultClass \Drupal\language\Plugin\migrate\process\LanguageNegotiation @group language
Namespace
Drupal\Tests\language\Unit\processCode
public function testTransformWithoutWeights() : void {
$source = [
[
'locale-url' => [],
'locale-url-fallback' => [],
],
];
$expected = [
'enabled' => [
'language-url' => 0,
'language-url-fallback' => 1,
],
];
$value = $this->plugin
->transform($source, $this->migrateExecutable, $this->row, 'destination_property');
$this->assertSame($value, $expected);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.