mirror of
				https://github.com/kevinveenbirkenbach/infinito.git
				synced 2025-10-31 17:29:04 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			31 lines
		
	
	
		
			762 B
		
	
	
	
		
			PHP
		
	
	
	
	
	
			
		
		
	
	
			31 lines
		
	
	
		
			762 B
		
	
	
	
		
			PHP
		
	
	
	
	
	
| <?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->assertEquals(0, $this->relation->getVersion());
 | |
|         $this->expectException(\TypeError::class);
 | |
|         $this->relation->getSource();
 | |
|     }
 | |
| }
 |