php-kilo/tests/Enum/ConstListTest.php

26 lines
451 B
PHP
Raw Normal View History

2019-11-19 13:48:12 -05:00
<?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());
}
}