mirror of
https://github.com/furyfire/trueskill.git
synced 2025-01-15 17:37:39 +00:00
Jens True
9df860b08b
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
30 lines
952 B
PHP
30 lines
952 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace DNW\Skills\Tests;
|
|
|
|
use DNW\Skills\SkillCalculator;
|
|
use DNW\Skills\TeamsRange;
|
|
use DNW\Skills\PlayersRange;
|
|
use PHPUnit\Framework\TestCase;
|
|
use PHPUnit\Framework\Attributes\CoversClass;
|
|
use PHPUnit\Framework\Attributes\UsesClass;
|
|
use PHPUnit\Framework\Attributes\RequiresPhpunit;
|
|
|
|
#[CoversClass(SkillCalculator::class)]
|
|
#[UsesClass(\DNW\Skills\Numerics\Range::class)]
|
|
#[UsesClass(PlayersRange::class)]
|
|
#[UsesClass(TeamsRange::class)]
|
|
#[RequiresPhpunit('<12.0')]
|
|
class SkillCalculatorTest extends TestCase
|
|
{
|
|
public function testisSupported(): void
|
|
{
|
|
$calculator = $this->getMockForAbstractClass(SkillCalculator::class, [SkillCalculator::PARTIAL_PLAY, new TeamsRange(1, 2), new PlayersRange(1, 2)]);
|
|
|
|
$this->assertEquals(TRUE, $calculator->isSupported(SkillCalculator::PARTIAL_PLAY));
|
|
$this->assertEquals(FALSE, $calculator->isSupported(SkillCalculator::PARTIAL_UPDATE));
|
|
}
|
|
}
|