function GetTest::testIntegerValues
Same name in other branches
- 8.9.x core/modules/migrate/tests/src/Unit/process/GetTest.php \Drupal\Tests\migrate\Unit\process\GetTest::testIntegerValues()
- 10 core/modules/migrate/tests/src/Unit/process/GetTest.php \Drupal\Tests\migrate\Unit\process\GetTest::testIntegerValues()
- 11.x core/modules/migrate/tests/src/Unit/process/GetTest.php \Drupal\Tests\migrate\Unit\process\GetTest::testIntegerValues()
Tests the Get plugin when source has integer values.
@dataProvider integerValuesDataProvider
File
-
core/
modules/ migrate/ tests/ src/ Unit/ process/ GetTest.php, line 83
Class
- GetTest
- Tests the get process plugin.
Namespace
Drupal\Tests\migrate\Unit\processCode
public function testIntegerValues($source, $expected_value) {
$this->row
->expects($this->atMost(2))
->method('get')
->willReturnOnConsecutiveCalls('val1', 'val2');
$this->plugin = new Get([
'source' => $source,
], '', []);
$return = $this->plugin
->transform(NULL, $this->migrateExecutable, $this->row, 'destination_property');
$this->assertSame($expected_value, $return);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.