public function SiteStatusMessageTestCase::testCss in Site Status Message 7
Test for the CSS.
File
- tests/
site_status_message.test, line 120 - Tests for Site Status Message module.
Class
- SiteStatusMessageTestCase
- Class SiteStatusMessageTestCase.
Code
public function testCss() {
// Ensure CSS is included in the page when a message is displayed.
$this
->adminLogin();
$this
->drupalPost($this->siteStatusMessageAdminPage, $this->validFormPost, 'Save configuration');
$this
->drupalGet('<front>');
$this
->assertRaw('site_status_message.css', 'Site Status Message CSS file is included in page HTML.');
// Turn off message. Ensure CSS is not included.
$this->validFormPost['site_status_message_display_options'] = 'off';
$this
->drupalPost($this->siteStatusMessageAdminPage, $this->validFormPost, 'Save configuration');
$this
->drupalGet('<front>');
$this
->assertNoRaw('site_status_message.css', 'Site Status Message CSS file is not included in page HTML.');
}