Tests that analyze works in general.

File

tests/views_analyze.test, line 38
Definition of ViewsAnalyzeTest.

Class

ViewsAnalyzeTest
Tests the views analyze system.

Code

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

  // Enable the frontpage view and click the analyse button.
  $view = views_get_view('frontpage');
  $view
    ->save();
  $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'));
}