mirror of
https://github.com/danog/endtoend-test-psl.git
synced 2024-12-02 09:38:32 +01:00
30 lines
554 B
PHP
30 lines
554 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace Psl\Tests\Arr;
|
|
|
|
use PHPUnit\Framework\TestCase;
|
|
use Psl\Arr;
|
|
|
|
class KeysTest extends TestCase
|
|
{
|
|
public function testValues(): void
|
|
{
|
|
$array = [
|
|
'foo' => 'bar',
|
|
'bar' => 'baz',
|
|
'baz' => 'qux',
|
|
];
|
|
|
|
$keys = Arr\keys($array);
|
|
|
|
self::assertSameSize($keys, $array);
|
|
self::assertSame($keys, \array_keys($array));
|
|
|
|
foreach ($array as $key => $value) {
|
|
self::assertTrue(Arr\contains($keys, $key));
|
|
}
|
|
}
|
|
}
|