mirror of
https://github.com/pestphp/pest.git
synced 2026-03-10 01:37:21 +01:00
fix: test suite
This commit is contained in:
@ -195,7 +195,7 @@ trait Testable
|
||||
$method = TestSuite::getInstance()->tests->get(self::$__filename)->getMethod($this->name());
|
||||
|
||||
$description = $this->dataName() ? $method->description.' with '.$this->dataName() : $method->description;
|
||||
$description = htmlspecialchars(html_entity_decode($description), ENT_NOQUOTES);
|
||||
$description = htmlspecialchars(html_entity_decode((string) $description), ENT_NOQUOTES);
|
||||
|
||||
if ($method->repetitions > 1) {
|
||||
$matches = [];
|
||||
|
||||
@ -72,13 +72,13 @@ final class Thanks
|
||||
}
|
||||
|
||||
if ($wantsToSupport === true) {
|
||||
if (PHP_OS_FAMILY == 'Darwin') {
|
||||
if (PHP_OS_FAMILY === 'Darwin') {
|
||||
exec('open https://github.com/pestphp/pest');
|
||||
}
|
||||
if (PHP_OS_FAMILY == 'Windows') {
|
||||
if (PHP_OS_FAMILY === 'Windows') {
|
||||
exec('start https://github.com/pestphp/pest');
|
||||
}
|
||||
if (PHP_OS_FAMILY == 'Linux') {
|
||||
if (PHP_OS_FAMILY === 'Linux') {
|
||||
exec('xdg-open https://github.com/pestphp/pest');
|
||||
}
|
||||
}
|
||||
|
||||
@ -129,7 +129,7 @@ final class Converter
|
||||
|
||||
// Format stacktrace as `at <path>`
|
||||
$frames = array_map(
|
||||
fn (string $frame) => "at $frame",
|
||||
fn (string $frame): string => "at $frame",
|
||||
$frames
|
||||
);
|
||||
|
||||
|
||||
@ -9,5 +9,14 @@ namespace Pest\PendingCalls\Concerns;
|
||||
*/
|
||||
trait Describable
|
||||
{
|
||||
/**
|
||||
* Note: this is property is not used; however,
|
||||
* it gets added automatically by rector php.
|
||||
*/
|
||||
public string $__describing;
|
||||
|
||||
/**
|
||||
* The describing of the test case.
|
||||
*/
|
||||
public ?string $describing = null;
|
||||
}
|
||||
|
||||
@ -40,7 +40,7 @@ final class Only implements Terminable
|
||||
*/
|
||||
public static function enable(TestCall $testCall): void
|
||||
{
|
||||
if (Environment::name() == Environment::CI) {
|
||||
if (Environment::name() === Environment::CI) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@ -26,7 +26,7 @@ final class Laravel implements HandlesArguments
|
||||
*/
|
||||
public function handleArguments(array $arguments): array
|
||||
{
|
||||
return self::whenUsingLaravel($arguments, function (array $arguments): array {
|
||||
return $this->whenUsingLaravel($arguments, function (array $arguments): array {
|
||||
$this->ensureRunnerIsResolvable();
|
||||
|
||||
$arguments = $this->ensureEnvironmentVariables($arguments);
|
||||
@ -42,7 +42,7 @@ final class Laravel implements HandlesArguments
|
||||
* @param CLosure(array<int, string>): array<int, string> $closure
|
||||
* @return array<int, string>
|
||||
*/
|
||||
private static function whenUsingLaravel(array $arguments, Closure $closure): array
|
||||
private function whenUsingLaravel(array $arguments, Closure $closure): array
|
||||
{
|
||||
$isLaravelApplication = InstalledVersions::isInstalled('laravel/framework', false);
|
||||
$isLaravelPackage = class_exists(\Orchestra\Testbench\TestCase::class);
|
||||
|
||||
Reference in New Issue
Block a user