public function assertBundles(TableNode $expected) {
    $bundle_info = [];
    foreach ($this->getContentEntityTypes() as $entity_type) {
      $bundles = $this->entityTypeManager()
        ->getStorage($entity_type->getBundleEntityType())
        ->loadMultiple();
      foreach ($bundles as $bundle) {
        $description = '';
        $description_getter = 'getDescription';
        if (method_exists($bundle, $description_getter)) {
          $description = call_user_func([
            $bundle,
            $description_getter,
          ]);
        }
        if (!isset($description) || !$description) {
          $description = '';
        }

        $bundle_info[] = [
          $bundle->label(),
          $bundle->id(),
          $entity_type->getBundleLabel(),
          $description,
        ];
      }
    }
    $actual = new TableNode($bundle_info);

    (new TableEqualityAssertion($expected, $actual))
      ->expectHeader([
        'Name',
        'Machine name',
        'Type',
        'Description',
      ])
      ->ignoreRowOrder()
      ->setMissingRowsLabel(self::missingRowsLabelFor('bundles'))
      ->setUnexpectedRowsLabel(self::unexpectedRowsLabelFor('bundles'))
      ->assert();
  }
public function assertBundles(TableNode $expected) {
    $bundle_info = [];
    foreach ($this->getContentEntityTypes() as $entity_type) {
      $bundles = $this->entityTypeManager()
        ->getStorage($entity_type->getBundleEntityType())
        ->loadMultiple();
      foreach ($bundles as $bundle) {
        $description = '';
        $description_getter = 'getDescription';
        if (method_exists($bundle, $description_getter)) {
          $description = call_user_func([
            $bundle,
            $description_getter,
          ]);
        }
        if (!isset($description) || !$description) {
          $description = '';
        }

        $bundle_info[] = [
          $bundle->label(),
          $bundle->id(),
          $entity_type->getBundleLabel(),
          $description,
        ];
      }
    }
    $actual = new TableNode($bundle_info);

    (new TableEqualityAssertion($expected, $actual))
      ->expectHeader([
        'Name',
        'Machine name',
        'Type',
        'Description',
      ])
      ->ignoreRowOrder()
      ->setMissingRowsLabel(self::missingRowsLabelFor('bundles'))
      ->setUnexpectedRowsLabel(self::unexpectedRowsLabelFor('bundles'))
      ->assert();
  }
public function assertBundles ( TableNode $ expected ) { $ bundle_info = [ ] ; foreach ( $ this -> getContentEntityTypes ( ) as $ entity_type ) { $ bundles = $ this -> entityTypeManager ( ) -> getStorage ( $ entity_type -> getBundleEntityType ( ) ) -> loadMultiple ( ) ; foreach ( $ bundles as $ bundle ) { $ description = '' ; $ description_getter = 'getDescription' ; if ( method_exists ( $ bundle , $ description_getter ) ) { $ description = call_user_func ( [ $ bundle , $ description_getter , ] ) ; } if ( ! isset ( $ description ) || ! $ description ) { $ description = '' ; } $ bundle_info [ ] = [ $ bundle -> label ( ) , $ bundle -> id ( ) , $ entity_type -> getBundleLabel ( ) , $ description , ] ; } } $ actual = new TableNode ( $ bundle_info ) ; ( new TableEqualityAssertion ( $ expected , $ actual ) ) -> expectHeader ( [ 'Name' , 'Machine name' , 'Type' , 'Description' , ] ) -> ignoreRowOrder ( ) -> setMissingRowsLabel ( self :: missingRowsLabelFor ( 'bundles' ) ) -> setUnexpectedRowsLabel ( self :: unexpectedRowsLabelFor ( 'bundles' ) ) -> assert ( ) ; }
Asserts the configuration of content entity type bundles.

@Then exactly the following content entity type bundles should exist

@throws \Exception
Asserts the configuration of content entity type bundles .