public function testDiffInfiniteLoop() { $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'
);
$from =
explode("\n",
file_get_contents(__DIR__ . '/fixtures/file1.txt'
));
$to =
explode("\n",
file_get_contents(__DIR__ . '/fixtures/file2.txt'
));
$diff_engine =
new DiffEngine();
$diff =
$diff_engine->
diff($from,
$to);
$this->
assertCount(4,
$diff);
$this->
assertEquals($diff[0
],
new DiffOpDelete([' - image.style.max_650x650'
]));
$this->
assertEquals($diff[1
],
new DiffOpCopy([' - image.style.max_325x325'
]));
$this->
assertEquals($diff[2
],
new DiffOpAdd([' - image.style.max_650x650', '_core:', ' default_config_hash: 3mjM9p-kQ8syzH7N8T0L9OnCJDSPvHAZoi3q6jcXJKM'
]));
$this->
assertEquals($diff[3
],
new DiffOpCopy(['fallback_image_style: max_325x325', ''
]));
}}