mirror of
				https://github.com/kevinveenbirkenbach/infinito.git
				synced 2025-11-04 03:07:58 +00:00 
			
		
		
		
	Implemented tests for relation
This commit is contained in:
		
							
								
								
									
										28
									
								
								application/tests/Unit/Entity/Meta/RelationTest.php
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										28
									
								
								application/tests/Unit/Entity/Meta/RelationTest.php
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,28 @@
 | 
			
		||||
<?php
 | 
			
		||||
namespace tests\Unit\Entity\Meta;
 | 
			
		||||
 | 
			
		||||
use PHPUnit\Framework\TestCase;
 | 
			
		||||
use App\Entity\Meta\RelationInterface;
 | 
			
		||||
use App\Entity\Meta\Relation;
 | 
			
		||||
use Doctrine\Common\Collections\Collection;
 | 
			
		||||
 | 
			
		||||
class RelationTest extends TestCase
 | 
			
		||||
{
 | 
			
		||||
    /**
 | 
			
		||||
     * 
 | 
			
		||||
     * @var RelationInterface
 | 
			
		||||
     */
 | 
			
		||||
    protected $relation;
 | 
			
		||||
    
 | 
			
		||||
    public function setUp():void{
 | 
			
		||||
        $this->relation = new Relation();
 | 
			
		||||
    }
 | 
			
		||||
    
 | 
			
		||||
    public function testConstructor():void {
 | 
			
		||||
        $this->assertInstanceOf(Collection::class, $this->relation->getChilds());
 | 
			
		||||
        $this->assertInstanceOf(Collection::class, $this->relation->getParents());
 | 
			
		||||
        $this->expectException(\TypeError::class);
 | 
			
		||||
        $this->relation->getSource();
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
		Reference in New Issue
	
	Block a user