You are here

public function WebformLocalizationWebTestCase::countString in Webform Localization 7

Same name and namespace in other branches
  1. 7.4 tests/webform_localization.test \WebformLocalizationWebTestCase::countString()
1 call to WebformLocalizationWebTestCase::countString()
WebformLocalizationWebTestCase::createStringTranslation in tests/webform_localization.test
Create translation for string in textgroup

File

tests/webform_localization.test, line 324
Webform localization module tests.

Class

WebformLocalizationWebTestCase
@file Webform localization module tests.

Code

public function countString($string) {
  if ($this->plainTextContent === FALSE) {
    $this->plainTextContent = filter_xss($this
      ->drupalGetContent(), array());
  }
  return substr_count($this->plainTextContent, $string);
}