mirror of
				https://github.com/kevinveenbirkenbach/infinito.git
				synced 2025-11-04 11:17:58 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			37 lines
		
	
	
		
			861 B
		
	
	
	
		
			PHP
		
	
	
	
	
	
			
		
		
	
	
			37 lines
		
	
	
		
			861 B
		
	
	
	
		
			PHP
		
	
	
	
	
	
<?php
 | 
						|
 | 
						|
namespace Entity\Attribut;
 | 
						|
 | 
						|
use PHPUnit\Framework\TestCase;
 | 
						|
use App\Entity\Attribut\ChildsAttributeInterface;
 | 
						|
use App\Entity\Attribut\ChildsAttribut;
 | 
						|
use Doctrine\Common\Collections\ArrayCollection;
 | 
						|
 | 
						|
class ChildsAttributTest extends TestCase
 | 
						|
{
 | 
						|
    /**
 | 
						|
     * @var ChildsAttributeInterface
 | 
						|
     */
 | 
						|
    protected $childs;
 | 
						|
 | 
						|
    public function setUp(): void
 | 
						|
    {
 | 
						|
        $this->childs = new class() implements ChildsAttributeInterface {
 | 
						|
            use ChildsAttribut;
 | 
						|
        };
 | 
						|
    }
 | 
						|
 | 
						|
    public function testConstructor(): void
 | 
						|
    {
 | 
						|
        $this->expectException(\TypeError::class);
 | 
						|
        $this->childs->getChilds();
 | 
						|
    }
 | 
						|
 | 
						|
    public function testAccessors(): void
 | 
						|
    {
 | 
						|
        $childs = new ArrayCollection();
 | 
						|
        $this->assertNull($this->childs->setChilds($childs));
 | 
						|
        $this->assertEquals($childs, $this->childs->getChilds());
 | 
						|
    }
 | 
						|
}
 |