mirror of
https://github.com/kevinveenbirkenbach/infinito.git
synced 2025-01-09 14:07:25 +01:00
Implemented tests to keep code coverage high
This commit is contained in:
parent
6bf17f5935
commit
7e35def4c3
41
application/tests/Unit/Form/NameSourceTypeTest.php
Normal file
41
application/tests/Unit/Form/NameSourceTypeTest.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;
|
||||
use App\Form\NameSourceType;
|
||||
|
||||
/**
|
||||
* This class just exists to keep the code coverage high.
|
||||
*
|
||||
* @todo Implement better tests!
|
||||
*
|
||||
* @author kevinfrantz
|
||||
*/
|
||||
class NameSourceTypeTest extends TestCase
|
||||
{
|
||||
/**
|
||||
* @var AbstractType
|
||||
*/
|
||||
protected $type;
|
||||
|
||||
public function setUp(): void
|
||||
{
|
||||
$this->type = new NameSourceType();
|
||||
}
|
||||
|
||||
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));
|
||||
}
|
||||
}
|
41
application/tests/Unit/Form/UserSourceTypeTest.php
Normal file
41
application/tests/Unit/Form/UserSourceTypeTest.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;
|
||||
use App\Form\UserSourceType;
|
||||
|
||||
/**
|
||||
* This class just exists to keep the code coverage high.
|
||||
*
|
||||
* @todo Implement better tests!
|
||||
*
|
||||
* @author kevinfrantz
|
||||
*/
|
||||
class UserSourceTypeTest extends TestCase
|
||||
{
|
||||
/**
|
||||
* @var AbstractType
|
||||
*/
|
||||
protected $type;
|
||||
|
||||
public function setUp(): void
|
||||
{
|
||||
$this->type = new UserSourceType();
|
||||
}
|
||||
|
||||
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));
|
||||
}
|
||||
}
|
43
application/tests/Unit/Form/UserTypeTest.php
Normal file
43
application/tests/Unit/Form/UserTypeTest.php
Normal file
@ -0,0 +1,43 @@
|
||||
<?php
|
||||
|
||||
namespace Tests\Unit\Form;
|
||||
|
||||
use PHPUnit\Framework\TestCase;
|
||||
use App\Form\AbstractType;
|
||||
use Symfony\Component\OptionsResolver\OptionsResolver;
|
||||
use App\Form\UserType;
|
||||
use Symfony\Component\Form\FormBuilder;
|
||||
use Symfony\Component\EventDispatcher\EventDispatcherInterface;
|
||||
use Symfony\Component\Form\FormFactoryInterface;
|
||||
|
||||
/**
|
||||
* This class just exists to keep the code coverage high.
|
||||
*
|
||||
* @todo Implement better tests!
|
||||
*
|
||||
* @author kevinfrantz
|
||||
*/
|
||||
class UserTypeTest extends TestCase
|
||||
{
|
||||
/**
|
||||
* @var AbstractType
|
||||
*/
|
||||
protected $type;
|
||||
|
||||
public function setUp(): void
|
||||
{
|
||||
$this->type = new UserType();
|
||||
}
|
||||
|
||||
public function testBuildForm(): void
|
||||
{
|
||||
$builder = new FormBuilder(null, null, $this->createMock(EventDispatcherInterface::class), $this->createMock(FormFactoryInterface::class));
|
||||
$this->assertNull($this->type->buildForm($builder, []));
|
||||
}
|
||||
|
||||
public function testConfigureOptions(): void
|
||||
{
|
||||
$resolver = $this->createMock(OptionsResolver::class);
|
||||
$this->assertNull($this->type->configureOptions($resolver));
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user