public function UpdateNonExistentActionUpdateTest::testUpdateActionsUpdateNonExistent in Feeds 8.3
Tests replacing use of deprecated action ID's with the new ones.
File
- tests/
src/ Functional/ Update/ UpdateNonExistentActionUpdateTest.php, line 41
Class
- UpdateNonExistentActionUpdateTest
- Provides tests for updating deprecated action ID's in feed types.
Namespace
Drupal\Tests\feeds\Functional\UpdateCode
public function testUpdateActionsUpdateNonExistent() {
// Run the updates.
$this
->runUpdates();
// Ensure the action ID's were updated for all feed types.
$expected = [
'article_importer1' => 'entity:unpublish_action:node',
'article_importer2' => 'entity:publish_action:node',
'article_importer3' => '_delete',
'article_importer4' => 'entity:unpublish_action:node',
];
foreach ($expected as $feed_type_id => $expected_action_id) {
$update_non_existent_action = FeedType::load($feed_type_id)
->getProcessor()
->getConfiguration('update_non_existent');
$this
->assertEquals($expected_action_id, $update_non_existent_action);
}
}