public function testMachineNames(string
$human_name, array
$configuration, string
$expected_result): void
{ // Test for calling transliterate on mock object.
$this->transliteration
->
expects($this->
once()) ->
method('transliterate'
) ->
with($human_name) ->
willReturnCallback(function Dstring
$string): string
{ return str_replace(['á', 'é', 'ő'
],
['a', 'e', 'o'
],
$string);
});
$plugin =
new MachineName($configuration, 'machine_name',
[],
$this->transliteration
);
$value =
$plugin->
transform($human_name,
$this->migrateExecutable,
$this->row, 'destination_property'
);
$this->
assertEquals($expected_result,
$value);
} /**
* Provides test cases for MachineNameTest::testMachineNames().
*
* @return array
* An array of test cases.
*/
public function providerTestMachineNames(): array
{