php-kilo/tests/Traits/ConstListTest.php

26 lines
455 B
PHP
Raw Permalink Normal View History

2019-11-19 13:48:12 -05:00
<?php declare(strict_types=1);
2019-11-19 15:57:51 -05:00
namespace Aviat\Kilo\Tests\Traits;
2019-11-19 13:48:12 -05:00
2019-11-19 15:57:51 -05:00
use Aviat\Kilo\Traits\ConstList;
2019-11-19 13:48:12 -05:00
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());
}
}