<?php

namespace App\Tests\Entity;

use App\Entity\Formules;
use App\Entity\FormulesRestriction;
use PHPUnit\Framework\TestCase;

class FormulesRestrictionTest extends TestCase
{
    public function testGettersAndSetters()
    {
        $restriction = new FormulesRestriction();
        $formule = new Formules();
        $config = ['min' => 1, 'max' => 5];

        $restriction->setFormule($formule);
        $restriction->setNbStructureMax(10);
        $restriction->setRestrictionConfig($config);
        $restriction->setNbAlimentaireMax(2);
        $restriction->setNbBarhumsMax(3);

        $this->assertSame($formule, $restriction->getFormule());
        $this->assertEquals(10, $restriction->getNbStructureMax());
        $this->assertEquals($config, $restriction->getRestrictionConfig());
        $this->assertEquals(2, $restriction->getNbAlimentaireMax());
        $this->assertEquals(3, $restriction->getNbBarhumsMax());
    }
}
