public function ScannerUiTestCase::testTheSiteStillWorks in Search and Replace Scanner 7
Make sure the site still works. For now just check the front page.
File
- tests/
ScannerUiTestCase.test, line 27 - Some tests for the Search and Replace Scanner module.
Class
- ScannerUiTestCase
- Test the UI for the Scanner module.
Code
public function testTheSiteStillWorks() {
// Log in as user 1, we don't care about permissions for this.
$this
->loginUser1();
// Load the settings form.
$this
->drupalGet('admin/config/content/scanner');
$this
->assertResponse(200);
// Run through the form options that should be visible.
$this
->assertText(t('Default options'));
$this
->assertFieldByName('scanner_mode');
$this
->assertFieldByName('scanner_wholeword');
$this
->assertFieldByName('scanner_regex');
$this
->assertFieldByName('scanner_published');
$this
->assertFieldByName('scanner_pathauto');
// The taxonomy handling.
$this
->assertText('Allow restrictions by terms in a vocabulary');
$this
->assertFieldByName('scanner_vocabulary[1]');
// Field handling.
$this
->assertText('Fields that will be searched');
$this
->assertFieldByName('scanner_body_field_revision_body_article');
$this
->assertFieldByName('scanner_title_node_revision_article');
$this
->assertFieldByName('scanner_body_field_revision_body_page');
$this
->assertFieldByName('scanner_title_node_revision_page');
}