Definition of ViewsAnalyzeTest.
<?php /** * @file * Definition of ViewsAnalyzeTest. */ require_once BACKDROP_ROOT . '/core/modules/views/tests/views_query.test'; /** * Tests the views analyze system. */ class ViewsAnalyzeTest extends ViewsSqlTest { /** * @var User */ protected $admin; protected function setUp(array $modules = array()) { parent::setUp($modules); // Add an admin user will full rights; $this->admin = $this->backdropCreateUser(array('administer views')); } /** * Tests that analyze works in general. */ function testAnalyzeBasic() { $this->backdropLogin($this->admin); // Enable the taxonomy_term view and click the analyse button. $view = views_get_view('taxonomy_term'); $view->save(); $this->backdropGet('admin/structure/views/view/taxonomy_term/configure'); $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 configure page. $this->backdropPost(NULL, array(), t('Ok')); } }