public function assertViewsExist(TableNode $expected) {
    $views_info = [];
    foreach ($this->getViews() as $id => $view) {
      $views_info[] = [
        $view->label(),
        $id,
        $this->getBaseTableLabel($view->get('base_table')),
        $view->status() ? 'Enabled' : 'Disabled',
        $view->get('description'),
      ];
    }
    $actual = new TableNode($views_info);

    (new TableEqualityAssertion($expected, $actual))
      ->expectHeader([
        'Name',
        'Machine name',
        'Base table',
        'Status',
        'Description',
      ])
      ->ignoreRowOrder()
      ->setMissingRowsLabel(self::missingRowsLabelFor('views'))
      ->setUnexpectedRowsLabel(self::unexpectedRowsLabelFor('views'))
      ->assert();
  }
public function assertViewsExist(TableNode $expected) {
    $views_info = [];
    foreach ($this->getViews() as $id => $view) {
      $views_info[] = [
        $view->label(),
        $id,
        $this->getBaseTableLabel($view->get('base_table')),
        $view->status() ? 'Enabled' : 'Disabled',
        $view->get('description'),
      ];
    }
    $actual = new TableNode($views_info);

    (new TableEqualityAssertion($expected, $actual))
      ->expectHeader([
        'Name',
        'Machine name',
        'Base table',
        'Status',
        'Description',
      ])
      ->ignoreRowOrder()
      ->setMissingRowsLabel(self::missingRowsLabelFor('views'))
      ->setUnexpectedRowsLabel(self::unexpectedRowsLabelFor('views'))
      ->assert();
  }
public function assertViewsExist ( TableNode $ expected ) { $ views_info = [ ] ; foreach ( $ this -> getViews ( ) as $ id => $ view ) { $ views_info [ ] = [ $ view -> label ( ) , $ id , $ this -> getBaseTableLabel ( $ view -> get ( 'base_table' ) ) , $ view -> status ( ) ? 'Enabled' : 'Disabled' , $ view -> get ( 'description' ) , ] ; } $ actual = new TableNode ( $ views_info ) ; ( new TableEqualityAssertion ( $ expected , $ actual ) ) -> expectHeader ( [ 'Name' , 'Machine name' , 'Base table' , 'Status' , 'Description' , ] ) -> ignoreRowOrder ( ) -> setMissingRowsLabel ( self :: missingRowsLabelFor ( 'views' ) ) -> setUnexpectedRowsLabel ( self :: unexpectedRowsLabelFor ( 'views' ) ) -> assert ( ) ; }
Asserts the configuration of views.

@Then exactly the following views should exist

@throws \Exception
Asserts the configuration of views .