@@ -250,7 +250,7 @@ func TestConstantParserTypeDetection(t *testing.T) {
250250 value string
251251 expectedType phpType
252252 }{
253- {"string with double quotes" , " \" hello world\" " , phpString },
253+ {"string with double quotes" , `" hello world"` , phpString },
254254 {"string with backticks" , "`hello world`" , phpString },
255255 {"boolean true" , "true" , phpBool },
256256 {"boolean false" , "false" , phpBool },
@@ -443,13 +443,13 @@ func TestConstantParserDeclRegex(t *testing.T) {
443443 name string
444444 value string
445445 }{
446- {" const MyConst = \ " value\" " , true , "MyConst" , " \" value\" " },
446+ {` const MyConst = "value"` , true , "MyConst" , `" value"` },
447447 {"const IntConst = 42" , true , "IntConst" , "42" },
448448 {"const BoolConst = true" , true , "BoolConst" , "true" },
449449 {"const IotaConst = iota" , true , "IotaConst" , "iota" },
450450 {"const ComplexValue = someFunction()" , true , "ComplexValue" , "someFunction()" },
451- {" const SpacedName = \ " with spaces\" " , true , "SpacedName" , " \" with spaces\" " },
452- {" var notAConst = \ " value\" " , false , "" , "" },
451+ {` const SpacedName = "with spaces"` , true , "SpacedName" , `" with spaces"` },
452+ {` var notAConst = "value"` , false , "" , "" },
453453 {"const" , false , "" , "" },
454454 {"const =" , false , "" , "" },
455455 }
@@ -518,10 +518,10 @@ func TestPHPConstantCValue(t *testing.T) {
518518 name : "string constant" ,
519519 constant : phpConstant {
520520 Name : "StringConst" ,
521- Value : " \" hello\" " ,
521+ Value : `" hello"` ,
522522 PhpType : phpString ,
523523 },
524- expected : " \" hello\" " , // strings should remain unchanged
524+ expected : `" hello"` , // strings should remain unchanged
525525 },
526526 {
527527 name : "boolean constant" ,
0 commit comments