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?