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