<?php
namespace App\Tests\Unit\Service\Utils;

use App\Service\Utils\Parser;
use PHPUnit\Framework\TestCase;

class ParserTest extends TestCase
{
    public const FIXTURES = __DIR__.'/fixtures';

    /**
     * @see Parser::yamlParser()
     */
    public function testYamlParser():void
    {
        $parser = new Parser();
        $parsingArray = $parser->yamlParser(self::FIXTURES, 'fixture.yaml');
        $this->assertIsArray($parsingArray);
        $this->assertIsArray($parsingArray['opentalent']);
        $this->assertEquals('ROLE_COTISATION', $parsingArray['opentalent']['modulesbyconditions']['CotisationCall']['roles'][0]);
    }
}
