} /**
* Tests whether op classes returned by DiffEngine::diff() match expectations.
*
* @covers ::diff
* @dataProvider provideTestDiff
*/
public function testDiff($expected,
$from,
$to) { $this->
expectDeprecation('Drupal\Component\Diff\Engine\DiffEngine is deprecated in drupal:10.1.0 and is removed from drupal:11.0.0. Use sebastianbergmann/diff instead. See https://www.drupal.org/node/3337942'
);
$diff_engine =
new DiffEngine();
$diff =
$diff_engine->
diff($from,
$to);
// Make sure we have the same number of results as expected.
$this->
assertSameSize($expected,
$diff);
// Make sure the diff objects match our expectations.
foreach ($expected as $index =>
$op_class) { $this->
assertEquals($op_class,
get_class($diff[$index]));
} } /**
* Tests that two files can be successfully diffed.
*
* @covers ::diff
*/