assertRecipesImported example


  public function testReinstall() {
    $module_installer = $this->container->get('module_installer');

    // Test imported blocks on profile install.     $block_storage = $this->container->get('entity_type.manager')->getStorage('block_content');
    $this->assertImportedCustomBlock($block_storage);

    // Test imported nodes on profile install.     $node_storage = $this->container->get('entity_type.manager')->getStorage('node');
    $this->assertRecipesImported($node_storage);

    $count = $node_storage->getQuery()
      ->accessCheck(FALSE)
      ->condition('type', 'article')
      ->count()
      ->execute();
    $this->assertGreaterThan(0, $count);

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

    
Home | Imprint | This part of the site doesn't use cookies.