public function GetTest::testIntegerValues in Drupal 8
Same name and namespace in other branches
- 9 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);
}