function xmlrpc_test_countTheEntities in SimpleTest 7
1 call to xmlrpc_test_countTheEntities()
- XMLRPCValidator1IncTestCase::testValidator1 in tests/
xmlrpc.test - Run validator1 tests.
1 string reference to 'xmlrpc_test_countTheEntities'
- xmlrpc_test_xmlrpc in tests/
xmlrpc_test.module - Implement hook_xmlrpc()
File
- tests/
xmlrpc_test.module, line 13
Code
function xmlrpc_test_countTheEntities($string) {
return array(
'ctLeftAngleBrackets' => substr_count($string, '<'),
'ctRightAngleBrackets' => substr_count($string, '>'),
'ctAmpersands' => substr_count($string, '&'),
'ctApostrophes' => substr_count($string, "'"),
'ctQuotes' => substr_count($string, '"'),
);
}