@@ -816,19 +816,7 @@ private function resolveTestVariable($inputString, $quoteBreak = false)
816
816
". Hook persisted entity references must follow \$\$entityMergeKey.field \$\$ format. "
817
817
);
818
818
}
819
- preg_match_all ("/\[[\w.]+\]/ " , $ variable [1 ], $ arrayMatch );
820
- if (!empty ($ arrayMatch [0 ])) {
821
- $ variable [1 ] = str_replace ($ arrayMatch [0 ][0 ], "" , $ variable [1 ]);
822
- $ arrayMatch [0 ][0 ] = trim ($ arrayMatch [0 ][0 ], "[] " );
823
- $ replacement = sprintf (
824
- "\$this->%s->getCreatedDataByName('%s')['%s'] " ,
825
- $ variable [0 ],
826
- $ variable [1 ],
827
- $ arrayMatch [0 ][0 ]
828
- );
829
- } else {
830
- $ replacement = sprintf ("\$this->%s->getCreatedDataByName('%s') " , $ variable [0 ], $ variable [1 ]);
831
- }
819
+ $ replacement = sprintf ("\$this->%s->getCreatedDataByName('%s') " , $ variable [0 ], $ variable [1 ]);
832
820
if ($ quoteBreak ) {
833
821
$ replacement = '" . ' . $ replacement . ' . " ' ;
834
822
}
@@ -847,19 +835,7 @@ private function resolveTestVariable($inputString, $quoteBreak = false)
847
835
". Test persisted entity references must follow \$entityMergeKey.field \$ format. "
848
836
);
849
837
}
850
- preg_match_all ("/\[[\w.]+\]/ " , $ variable [1 ], $ arrayMatch );
851
- if (!empty ($ arrayMatch [0 ])) {
852
- $ variable [1 ] = str_replace ($ arrayMatch [0 ][0 ], "" , $ variable [1 ]);
853
- $ arrayMatch [0 ][0 ] = trim ($ arrayMatch [0 ][0 ], "[] " );
854
- $ replacement = sprintf (
855
- "$%s->getCreatedDataByName('%s')['%s'] " ,
856
- $ variable [0 ],
857
- $ variable [1 ],
858
- $ arrayMatch [0 ][0 ]
859
- );
860
- } else {
861
- $ replacement = sprintf ("$%s->getCreatedDataByName('%s') " , $ variable [0 ], $ variable [1 ]);
862
- }
838
+ $ replacement = sprintf ("$%s->getCreatedDataByName('%s') " , $ variable [0 ], $ variable [1 ]);
863
839
if ($ quoteBreak ) {
864
840
$ replacement = '" . ' . $ replacement . ' . " ' ;
865
841
}
0 commit comments