expectedBlocks example

->execute();
    $this->assertGreaterThan(0, $count);

    // Uninstall the module.     $module_installer->uninstall(['demo_umami_content']);

    // Reset storage cache.     $block_storage->resetCache();
    $node_storage->resetCache();

    // Assert the removal of blocks on uninstall.     foreach ($this->expectedBlocks() as $block_info) {
      $count = $block_storage->getQuery()
        ->accessCheck(FALSE)
        ->condition('type', $block_info['type'])
        ->count()
        ->execute();
      $this->assertEquals(0, $count);
      $block = $block_storage->loadByProperties(['uuid' => $block_info['uuid']]);
      $this->assertCount(0, $block);
    }

    // Assert the removal of nodes on uninstall.
Home | Imprint | This part of the site doesn't use cookies.