mirror of
https://github.com/pestphp/pest.git
synced 2026-03-06 07:47:22 +01:00
updates dependencies and snapshots
This commit is contained in:
@ -660,7 +660,7 @@ final class Expectation
|
||||
{
|
||||
foreach ($keys as $k => $key) {
|
||||
if (is_array($key)) {
|
||||
$this->toHaveKeys(array_keys(Arr::dot($key, $k . '.')), $message);
|
||||
$this->toHaveKeys(array_keys(Arr::dot($key, $k.'.')), $message);
|
||||
} else {
|
||||
$this->toHaveKey($key, message: $message);
|
||||
}
|
||||
|
||||
@ -6,7 +6,7 @@ namespace Pest;
|
||||
|
||||
function version(): string
|
||||
{
|
||||
return '4.0.0-alpha.5';
|
||||
return '4.0.0-alpha.6';
|
||||
}
|
||||
|
||||
function testDirectory(string $file = ''): string
|
||||
|
||||
@ -19,8 +19,8 @@ final class SnapshotRepository
|
||||
* Creates a snapshot repository instance.
|
||||
*/
|
||||
public function __construct(
|
||||
readonly private string $testsPath,
|
||||
readonly private string $snapshotsPath,
|
||||
private readonly string $testsPath,
|
||||
private readonly string $snapshotsPath,
|
||||
) {}
|
||||
|
||||
/**
|
||||
|
||||
@ -58,7 +58,7 @@ final class Str
|
||||
{
|
||||
$code = str_replace('_', '__', $code);
|
||||
|
||||
$code = self::PREFIX . str_replace(' ', '_', $code);
|
||||
$code = self::PREFIX.str_replace(' ', '_', $code);
|
||||
|
||||
// sticks to PHP8.2 function naming rules https://www.php.net/manual/en/functions.user-defined.php
|
||||
return (string) preg_replace('/[^a-zA-Z0-9_\x80-\xff]/', '_', $code);
|
||||
@ -124,6 +124,7 @@ final class Str
|
||||
public static function slugify(string $target): string
|
||||
{
|
||||
$target = preg_replace('/[^a-zA-Z0-9]+/', '-', $target);
|
||||
|
||||
return strtolower(trim($target, '-'));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user