From 6bf17f5935872da0f55002849f2e377ef1417d22 Mon Sep 17 00:00:00 2001 From: Kevin Frantz Date: Sun, 4 Nov 2018 14:24:58 +0100 Subject: [PATCH] Implemented test for AbstractType to keep code coverage high --- application/src/Form/AbstractType.php | 9 ++++ application/src/Form/NameSourceType.php | 3 +- application/src/Form/UserSourceType.php | 1 - application/src/Form/UserType.php | 1 - .../tests/Unit/Form/AbstractTypeTest.php | 41 +++++++++++++++++++ 5 files changed, 51 insertions(+), 4 deletions(-) create mode 100644 application/src/Form/AbstractType.php create mode 100644 application/tests/Unit/Form/AbstractTypeTest.php diff --git a/application/src/Form/AbstractType.php b/application/src/Form/AbstractType.php new file mode 100644 index 0000000..28b4c75 --- /dev/null +++ b/application/src/Form/AbstractType.php @@ -0,0 +1,9 @@ +type = new class() extends AbstractType { + }; + } + + public function testBuildForm(): void + { + $builder = $this->createMock(FormBuilderInterface::class); + $this->assertNull($this->type->buildForm($builder, [])); + } + + public function testConfigureOptions(): void + { + $resolver = $this->createMock(OptionsResolver::class); + $this->assertNull($this->type->configureOptions($resolver)); + } +}