public function FeatureContext::cleanupBlocks in Accordion Blocks 8
Remove terms that we probably created. Nodes are handled because when a user is deleted their content is deleted as well. This not true for terms that they create though.
@AfterScenario
File
- tests/
features/ bootstrap/ FeatureContext.php, line 32
Class
- FeatureContext
- Defines application features from the specific context.
Code
public function cleanupBlocks() {
$query = Drupal::entityQuery('block_content');
$result = $query
->condition('info', 'BDD TESTING', 'STARTS_WITH')
->execute();
$eids = array_keys($result);
entity_delete_multiple('block_content', $eids);
}