mirror of
https://github.com/kevinveenbirkenbach/infinito.git
synced 2026-10-30 17:22:08 +00:00
Implemented tests to keep code coverage high
This commit is contained in:
1 parent
6bf17f5935
commit
7e35def4c3
3 files changed
+125
No files matched your search
@@ -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));
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -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));
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -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));
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in new issue
Block a user