26 lines
451 B
PHP
26 lines
451 B
PHP
<?php declare(strict_types=1);
|
|
|
|
namespace Aviat\Kilo\Tests\Enum;
|
|
|
|
use Aviat\Kilo\Enum\ConstList;
|
|
use PHPUnit\Framework\TestCase;
|
|
|
|
class ConstListTest extends TestCase {
|
|
public function testGetConstList(): void
|
|
{
|
|
$testClass = new class {
|
|
use ConstList;
|
|
|
|
public const foo = 'foo';
|
|
public const bar = 'bar';
|
|
};
|
|
|
|
$expected = [
|
|
'foo' => 'foo',
|
|
'bar' => 'bar',
|
|
];
|
|
|
|
$this->assertEquals($expected, $testClass::getConstList());
|
|
}
|
|
}
|