mirror of
				https://github.com/kevinveenbirkenbach/infinito.git
				synced 2025-11-03 18:58:01 +00:00 
			
		
		
		
	Optimized for SPA
This commit is contained in:
		
							
								
								
									
										41
									
								
								application/symfony/tests/Unit/Form/AbstractTypeTest.php
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										41
									
								
								application/symfony/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));
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										41
									
								
								application/symfony/tests/Unit/Form/NameSourceTypeTest.php
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										41
									
								
								application/symfony/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/symfony/tests/Unit/Form/UserSourceTypeTest.php
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										41
									
								
								application/symfony/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/symfony/tests/Unit/Form/UserTypeTest.php
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										43
									
								
								application/symfony/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));
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
		Reference in New Issue
	
	Block a user