mirror of
https://github.com/kevinveenbirkenbach/infinito.git
synced 2025-09-13 21:57:16 +02:00
Implemented test for AbstractType to keep code coverage high
This commit is contained in:
41
application/tests/Unit/Form/AbstractTypeTest.php
Normal file
41
application/tests/Unit/Form/AbstractTypeTest.php
Normal file
@@ -0,0 +1,41 @@
|
||||
<?php
|
||||
|
||||
namespace Tests\Unit\Form;
|
||||
|
||||
use PHPUnit\Framework\TestCase;
|
||||
use App\Form\AbstractType;
|
||||
use Symfony\Component\Form\FormBuilderInterface;
|
||||
use Symfony\Component\OptionsResolver\OptionsResolver;
|
||||
|
||||
/**
|
||||
* This class just exists to keep the code coverage high.
|
||||
*
|
||||
* @todo Implement better tests!
|
||||
*
|
||||
* @author kevinfrantz
|
||||
*/
|
||||
class AbstractTypeTest extends TestCase
|
||||
{
|
||||
/**
|
||||
* @var AbstractType
|
||||
*/
|
||||
protected $type;
|
||||
|
||||
public function setUp(): void
|
||||
{
|
||||
$this->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));
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user