mirror of
				https://github.com/kevinveenbirkenbach/infinito.git
				synced 2025-11-04 03:07:58 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			37 lines
		
	
	
		
			890 B
		
	
	
	
		
			PHP
		
	
	
	
	
	
			
		
		
	
	
			37 lines
		
	
	
		
			890 B
		
	
	
	
		
			PHP
		
	
	
	
	
	
<?php
 | 
						|
 | 
						|
namespace Tests\Unit\Attribut;
 | 
						|
 | 
						|
use PHPUnit\Framework\TestCase;
 | 
						|
use App\Attribut\RecieverAttributInterface;
 | 
						|
use App\Attribut\RecieverAttribut;
 | 
						|
use App\Entity\Source\AbstractSource;
 | 
						|
 | 
						|
class RecieverAttributTest extends TestCase
 | 
						|
{
 | 
						|
    /**
 | 
						|
     * @var RecieverAttributInterface
 | 
						|
     */
 | 
						|
    protected $reciever;
 | 
						|
 | 
						|
    public function setUp(): void
 | 
						|
    {
 | 
						|
        $this->reciever = new class() implements RecieverAttributInterface {
 | 
						|
            use RecieverAttribut;
 | 
						|
        };
 | 
						|
    }
 | 
						|
 | 
						|
    public function testConstructor(): void
 | 
						|
    {
 | 
						|
        $this->expectException(\TypeError::class);
 | 
						|
        $this->reciever->getReciever();
 | 
						|
    }
 | 
						|
 | 
						|
    public function testAccessors(): void
 | 
						|
    {
 | 
						|
        $reciever = $this->createMock(AbstractSource::class);
 | 
						|
        $this->assertNull($this->reciever->setReciever($reciever));
 | 
						|
        $this->assertEquals($reciever, $this->reciever->getReciever());
 | 
						|
    }
 | 
						|
}
 |