mirror of
				https://github.com/kevinveenbirkenbach/infinito.git
				synced 2025-11-04 03:07:58 +00:00 
			
		
		
		
	Implemented type for FormClassNameService and solved reference bugs
This commit is contained in:
		@@ -5,17 +5,26 @@ namespace tests\Unit\Domain\FormManagement;
 | 
			
		||||
use PHPUnit\Framework\TestCase;
 | 
			
		||||
use App\Domain\FormManagement\FormClassNameService;
 | 
			
		||||
use App\Entity\Source\PureSource;
 | 
			
		||||
use App\DBAL\Types\ActionType;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * @author kevinfrantz
 | 
			
		||||
 */
 | 
			
		||||
class FormClassNameServiceTest extends TestCase
 | 
			
		||||
{
 | 
			
		||||
    public function testGetName()
 | 
			
		||||
    public function testGetName(): void
 | 
			
		||||
    {
 | 
			
		||||
        $entityClass = PureSource::class;
 | 
			
		||||
        $formNameService = new FormClassNameService();
 | 
			
		||||
        $entityForm = $formNameService->getClass($entityClass);
 | 
			
		||||
        $this->assertEquals('App\\Form\\Source\\PureSourceType', $entityForm);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public function testWithType(): void
 | 
			
		||||
    {
 | 
			
		||||
        $entityClass = PureSource::class;
 | 
			
		||||
        $formNameService = new FormClassNameService();
 | 
			
		||||
        $entityForm = $formNameService->getClass($entityClass, ActionType::CREATE);
 | 
			
		||||
        $this->assertEquals('App\\Form\\Source\\PureSourceCreateType', $entityForm);
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user