OptionValue and OptionPattern not Changing Values

I am trying to produce a function with a few sets of arguments, one of which can accept options. However it doesn't seem to be responding to the changes that I accept.

ClearAll[testFn]
Options[testFn]={
"myOption"->"defaultValue"
};
testFn["A"][x_][y_,OptionsPattern[testFn]][z_]:={x,y,z,OptionValue[testFn,"myOption"]}

testFn["A"][1][2,"myOption"->"something"][3]
expectedOutput={1,2,3,"something"}


However this produces

{1, 2, 3, "defaultValue"}
{1, 2, 3, "something"}


I cannot seem to get the option to be anything except the default value in the first line of the input. Is there something I'm not doing correctly, if so, how can I fix it?

Need to pass the options to OptionValue as well as the head testFn:

ClearAll[testFn]
Options[testFn] = {"myOption" -> "defaultValue"};
testFn["A"][x_][y_, opts : OptionsPattern[]][z_] := {x, y, z,
OptionValue[testFn, {opts}, "myOption"]}

testFn["A"][1][2][3]
testFn["A"][1][2, "myOption" -> "something"][3]
(*
{1, 2, 3, "defaultValue"}
{1, 2, 3, "something"}
*)

• Awesome, exactly what I was looking for. Thanks! – user47636 Dec 15 '18 at 0:15
• @george You're welcome. – Michael E2 Dec 15 '18 at 0:16