1
0
This repository has been archived on 2023-11-30. You can view files and clone it, but cannot push or open issues or pull requests.
dtux__serveur-vote-lalis/include/condorcet/Tests/src/CondorcetUtilTest.php
2022-09-21 14:01:45 +02:00

27 lines
591 B
PHP

<?php
declare(strict_types=1);
namespace CondorcetPHP\Condorcet\Tests;
use CondorcetPHP\Condorcet\Utils\CondorcetUtil;
use CondorcetPHP\Condorcet\Vote;
use PHPUnit\Framework\TestCase;
class CondorcetUtilTest extends TestCase
{
public function testFormatVote(): void
{
$vote = new Vote('A>B>C');
$this->assertSame('A > B > C', CondorcetUtil::format($vote, true));
}
public function testDeleteComments(): void
{
$result = CondorcetUtil::prepareParse('A > B # This is a comment', false);
$this->assertSame(['A > B'], $result);
}
}