diff --git a/tests/Forms/BaseControl.extensionMethod.phpt b/tests/Forms/BaseControl.extensionMethod.phpt new file mode 100644 index 000000000..1cedbbc4f --- /dev/null +++ b/tests/Forms/BaseControl.extensionMethod.phpt @@ -0,0 +1,36 @@ +test(1, 2)); + +$control2 = new Checkbox; +Assert::same('Checkbox', $control2->test(1, 2)); + +Assert::exception(function () { + $control3 = new Button; + $control3->test(1, 2); +}, Nette\MemberAccessException::class); diff --git a/tests/Forms/Container.extensionMethod.phpt b/tests/Forms/Container.extensionMethod.phpt new file mode 100644 index 000000000..a0bfcc97d --- /dev/null +++ b/tests/Forms/Container.extensionMethod.phpt @@ -0,0 +1,18 @@ +test(1, 2));