You are here

private function CommonURLUnitTest::hasClass in Drupal 7

2 calls to CommonURLUnitTest::hasClass()
CommonURLUnitTest::testLActiveClass in modules/simpletest/tests/common.test
CommonURLUnitTest::testLCustomClass in modules/simpletest/tests/common.test
Tests for custom class in l() function.

File

modules/simpletest/tests/common.test, line 114
Tests for common.inc functionality.

Class

CommonURLUnitTest
Tests for URL generation functions.

Code

private function hasClass($link, $class) {
  return preg_match('|class="([^\\"\\s]+\\s+)*' . $class . '|', $link);
}