mirror of
				https://github.com/kevinveenbirkenbach/infinito.git
				synced 2025-10-31 17:29:04 +00:00 
			
		
		
		
	Implemented tests for relation attribute trait
This commit is contained in:
		| @@ -0,0 +1,30 @@ | ||||
| <?php | ||||
|  | ||||
| namespace App\Tests\Unit\Entity\Attribut; | ||||
|  | ||||
| use PHPUnit\Framework\TestCase; | ||||
| use App\Entity\Meta\RelationInterface; | ||||
| use App\Entity\Attribut\RelationAttributInterface; | ||||
| use App\Entity\Attribut\RelationAttribut; | ||||
|  | ||||
| class RelationAttributTest extends TestCase | ||||
| { | ||||
|     /*** | ||||
|      * @var RelationAttributInterface | ||||
|      */ | ||||
|     protected $relationAttribut; | ||||
|  | ||||
|     public function setUp(): void | ||||
|     { | ||||
|         $this->relationAttribut = new class() implements RelationAttributInterface { | ||||
|             use RelationAttribut; | ||||
|         }; | ||||
|     } | ||||
|  | ||||
|     public function testAccessors(): void | ||||
|     { | ||||
|         $relation = $this->createMock(RelationInterface::class); | ||||
|         $this->assertNull($this->relationAttribut->setRelation($relation)); | ||||
|         $this->assertEquals($relation, $this->relationAttribut->getRelation()); | ||||
|     } | ||||
| } | ||||
		Reference in New Issue
	
	Block a user