public function testJavascriptDataConversions() { $objCaseArray = array(array("Value" => "bob", "Expected" => "bob"), array("Value" => "Bob", "Expected" => "-bob"), array("Value" => "bobSmith", "Expected" => "bob-smith"), array("Value" => "bobSmithJones", "Expected" => "bob-smith-jones")); foreach ($objCaseArray as $objCase) { $newValue = JavaScriptHelper::dataNameFromCamelCase($objCase["Value"]); $this->assertEquals($objCase["Expected"], $newValue); } $objCaseArray = array(array("Value" => "bob", "Expected" => "bob"), array("Value" => "-bob", "Expected" => "Bob"), array("Value" => "bob-smith", "Expected" => "bobSmith"), array("Value" => "bob-smith-jones", "Expected" => "bobSmithJones")); foreach ($objCaseArray as $objCase) { $newValue = JavaScriptHelper::dataNameToCamelCase($objCase["Value"]); $this->assertEquals($objCase["Expected"], $newValue); } }