function AnalyzeTest::testAnalyzeBasic

Tests that analyze works in general.

File

drupal/core/modules/views/lib/Drupal/views/Tests/AnalyzeTest.php, line 40
Definition of Drupal\views\Tests\AnalyzeTest.

Class

AnalyzeTest
Tests the views analyze system.

Namespace

Drupal\views\Tests

Code

function testAnalyzeBasic() {
  $this
    ->drupalLogin($this->admin);

  // Enable the frontpage view and click the analyse button.
  $view = views_get_view('frontpage');
  $this
    ->drupalGet('admin/structure/views/view/frontpage/edit');
  $this
    ->assertLink(t('analyze view'));

  // This redirects the user to the form.
  $this
    ->clickLink(t('analyze view'));
  $this
    ->assertText(t('View analysis'));

  // This redirects the user back to the main views edit page.
  $this
    ->drupalPost(NULL, array(), t('Ok'));
}