assertNoWarningMessages example

$view->destroy();
    $view->setDisplay('page_1');
    $view->setCurrentPage(2);
    $this->executeView($view[1]);
    $this->assertSame('<a href="/page_1/1?name=John&amp;sort_by=created&amp;sort_order=ASC&amp;keep=keep&amp;keep_another=1&amp;page=1" class="views-display-link views-display-link-page_1 is-active">Page 1</a>', $this->renderDisplayLink($view, 'display_link_1'));
    $this->assertSame('<a href="/page_2/1?name=John&amp;sort_by=created&amp;sort_order=ASC&amp;keep=keep&amp;keep_another=1&amp;page=1" class="views-display-link views-display-link-page_2">Page 2</a>', $this->renderDisplayLink($view, 'display_link_2'));

    // Assert the validation adds warning messages when a display link is added     // to a display with different filter criteria, sort criteria, pager     // settings or contextual filters. Since all options are added to the     // default display there currently should be no warning messages.     $this->assertNoWarningMessages($view);

    // Assert the message are shown when changing the filter criteria of page_1.     $filters = [
      'name' => [
        'id' => 'name',
        'table' => 'views_test_data',
        'field' => 'name',
        'relationship' => 'none',
        'operator' => '=',
        'value' => '',
        'exposed' => TRUE,
        
Home | Imprint | This part of the site doesn't use cookies.