/**
* Reverts configuration done by the context.
*
* @AfterScenario
*/
public function revertConfiguration()
{
// Remove configuration entities.
foreach ($this->configurationEntities as $configuration) {
if ($configuration->entityType() == 'integration_consumer') {
/** @var AbstractConsumer $consumer */
$consumer = ConsumerFactory::getInstance($configuration->getMachineName());
$consumer->processRollback();
// Remove consumer & its corresponding migration.
Migration::deregisterMigration('test_consumer');
}
$configuration->delete();
}
if ($this->backendWasConfigured) {
entity_delete('integration_backend', 'http_mock');
}
if ($this->server && $this->server->isStarted()) {
$this->server->stop();
}
}