You are here

public function SiteBannerRenderingUnitTestCase::testBannerHeaderTextExists in Site Banner 7

Tests if header banner text built by hook implementation.

File

./site_banner.test, line 139

Class

SiteBannerRenderingUnitTestCase
Implements tests for checking that banner rendering functions are correct.

Code

public function testBannerHeaderTextExists() {
  $banner = variable_get('site_banner_text', '');
  $page = array();
  site_banner_page_build($page);
  $result = $page['page_top'][0]['#value'] == $banner;
  $message = 'Banner header displays correct text: "' . $banner . '".';
  $this
    ->assertTrue($result, $message);
}