function CommonURLUnitTest::hasClass

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 134

Class

CommonURLUnitTest
Tests for URL generation functions.

Code

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

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.