Tests that analyze works in general.
function testAnalyzeBasic() {
$this
->drupalLogin($this->admin);
$this
->drupalGet('admin/structure/views/view/test_view/edit');
$this
->assertLink(t('Analyze view'));
// This redirects the user to the analyze form.
$this
->clickLink(t('Analyze view'));
$this
->assertText(t('View analysis'));
foreach (array(
'ok',
'warning',
'error',
) as $type) {
$xpath = $this
->xpath('//div[contains(@class, :class)]', array(
':class' => $type,
));
$this
->assertTrue(count($xpath), format_string('Analyse messages with @type found', array(
'@type' => $type,
)));
}
// This redirects the user back to the main views edit page.
$this
->drupalPost(NULL, array(), t('Ok'));
}