Fixes filtering tests

This commit is contained in:
Nuno Maduro
2025-04-29 11:38:33 +01:00
parent db9243ca2e
commit a310796165
31 changed files with 98 additions and 58 deletions

View File

@ -11,12 +11,9 @@ use Pest\Exceptions\ShouldNotHappen;
*/
final class Backtrace
{
/**
* @var string
*/
private const FILE = 'file';
private const string FILE = 'file';
private const BACKTRACE_OPTIONS = DEBUG_BACKTRACE_IGNORE_ARGS;
private const int BACKTRACE_OPTIONS = DEBUG_BACKTRACE_IGNORE_ARGS;
/**
* Returns the current test file.

View File

@ -11,9 +11,9 @@ use function Pest\testDirectory;
*/
final class DatasetInfo
{
public const DATASETS_DIR_NAME = 'Datasets';
public const string DATASETS_DIR_NAME = 'Datasets';
public const DATASETS_FILE_NAME = 'Datasets.php';
public const string DATASETS_FILE_NAME = 'Datasets.php';
public static function isInsideADatasetsDirectory(string $file): bool
{

View File

@ -13,7 +13,7 @@ use Throwable;
*/
final class ExceptionTrace
{
private const UNDEFINED_METHOD = 'Call to undefined method P\\';
private const string UNDEFINED_METHOD = 'Call to undefined method P\\';
/**
* Ensures the given closure reports the good execution context.

View File

@ -15,7 +15,7 @@ final readonly class Exporter
/**
* The maximum number of items in an array to export.
*/
private const MAX_ARRAY_ITEMS = 3;
private const int MAX_ARRAY_ITEMS = 3;
/**
* Creates a new Exporter instance.

View File

@ -13,7 +13,7 @@ use Throwable;
*/
final class HigherOrderMessage
{
public const UNDEFINED_METHOD = 'Method %s does not exist';
public const string UNDEFINED_METHOD = 'Method %s does not exist';
/**
* An optional condition that will determine if the message will be executed.

View File

@ -13,12 +13,9 @@ final class Str
* Pool of alpha-numeric characters for generating (unsafe) random strings
* from.
*/
private const POOL = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';
private const string POOL = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';
/**
* @var string
*/
private const PREFIX = '__pest_evaluable_';
private const string PREFIX = '__pest_evaluable_';
/**
* Create a (unsecure & non-cryptographically safe) random alpha-numeric