Merge branch '2.x' into 3.x

This commit is contained in:
Nuno Maduro
2024-08-02 23:53:26 +01:00
8 changed files with 47 additions and 4 deletions
+1 -1
View File
@@ -583,7 +583,7 @@ final class Expectation
return Targeted::make( return Targeted::make(
$this, $this,
fn (ObjectDescription $object): bool => $object->reflectionClass->hasMethod($method), fn (ObjectDescription $object): bool => $object->reflectionClass->hasMethod($method),
'to have method', sprintf("to have method '%s'", $method),
FileLineFinder::where(fn (string $line): bool => str_contains($line, 'class')), FileLineFinder::where(fn (string $line): bool => str_contains($line, 'class')),
); );
} }
+13
View File
@@ -0,0 +1,13 @@
<?php
declare(strict_types=1);
namespace Pest\Factories\Covers;
/**
* @internal
*/
final class CoversClass
{
public function __construct(public string $class) {}
}
+13
View File
@@ -0,0 +1,13 @@
<?php
declare(strict_types=1);
namespace Pest\Factories\Covers;
/**
* @internal
*/
final class CoversFunction
{
public function __construct(public string $function) {}
}
+10
View File
@@ -0,0 +1,10 @@
<?php
declare(strict_types=1);
namespace Pest\Factories\Covers;
/**
* @internal
*/
final class CoversNothing {}
+1 -2
View File
@@ -166,8 +166,7 @@ final class TestCaseMethodFactory
$datasetsCode = ''; $datasetsCode = '';
// prepend attribute = $this->attributes = [
$this->attributes = [
new Attribute( new Attribute(
\PHPUnit\Framework\Attributes\Test::class, \PHPUnit\Framework\Attributes\Test::class,
[], [],
+1 -1
View File
@@ -6,7 +6,7 @@ namespace Pest;
function version(): string function version(): string
{ {
return '3.0.0-dev-0008'; return '3.0.0-beta-1';
} }
function testDirectory(string $file = ''): string function testDirectory(string $file = ''): string
@@ -1,5 +1,9 @@
<<<<<<< HEAD
Pest Testing Framework 3.0.0-dev-0008. Pest Testing Framework 3.0.0-dev-0008.
=======
Pest Testing Framework 2.35.0.
>>>>>>> 2.x
USAGE: pest <file> [options] USAGE: pest <file> [options]
@@ -1,3 +1,7 @@
<<<<<<< HEAD
Pest Testing Framework 3.0.0-dev-0008. Pest Testing Framework 3.0.0-dev-0008.
=======
Pest Testing Framework 2.35.0.
>>>>>>> 2.x