You are here

public function BrowsersyncTests::testSnippet in Browsersync 7

Checks for the presence of the snippet in the markup.

File

./browsersync.test, line 40
Code for the tests of the Browsersync module.

Class

BrowsersyncTests
@file Code for the tests of the Browsersync module.

Code

public function testSnippet() {
  $this
    ->drupalGet('<front>');
  $elements = $this
    ->xpath('//script[@id=:id]', array(
    ':id' => '__bs_script__',
  ));
  $this
    ->assertTrue(!empty($elements), 'Page contains the Browsersync snippet.');
}