From d668bc1e536b5a64f3e16d02fad9a19a9defd6e9 Mon Sep 17 00:00:00 2001 From: ADmad Date: Sat, 17 Feb 2018 00:08:26 +0530 Subject: [PATCH] Add test for previous commit. --- tests/TestCase/Form/FormTest.php | 5 +++++ tests/test_app/TestApp/Form/AppForm.php | 22 ++++++++++++++++++++ tests/test_app/TestApp/Form/FormSchema.php | 24 ++++++++++++++++++++++ 3 files changed, 51 insertions(+) create mode 100644 tests/test_app/TestApp/Form/AppForm.php create mode 100644 tests/test_app/TestApp/Form/FormSchema.php diff --git a/tests/TestCase/Form/FormTest.php b/tests/TestCase/Form/FormTest.php index c6b4421c175..3de3781c0ba 100644 --- a/tests/TestCase/Form/FormTest.php +++ b/tests/TestCase/Form/FormTest.php @@ -16,6 +16,8 @@ use Cake\Form\Form; use Cake\TestSuite\TestCase; +use TestApp\Form\AppForm; +use TestApp\Form\FormSchema; /** * Form test case. @@ -39,6 +41,9 @@ public function testSchema() $schema = $this->getMockBuilder('Cake\Form\Schema')->getMock(); $this->assertSame($schema, $form->schema($schema)); $this->assertSame($schema, $form->schema()); + + $form = new AppForm(); + $this->assertInstanceOf(FormSchema::class, $form->schema()); } /** diff --git a/tests/test_app/TestApp/Form/AppForm.php b/tests/test_app/TestApp/Form/AppForm.php new file mode 100644 index 00000000000..be7040497e5 --- /dev/null +++ b/tests/test_app/TestApp/Form/AppForm.php @@ -0,0 +1,22 @@ +