mirror of
https://github.com/pestphp/pest.git
synced 2026-03-12 02:37:22 +01:00
Merge branch '2.x' into 3.x
This commit is contained in:
@ -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
src/Factories/Covers/CoversClass.php
Normal file
13
src/Factories/Covers/CoversClass.php
Normal 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
src/Factories/Covers/CoversFunction.php
Normal file
13
src/Factories/Covers/CoversFunction.php
Normal 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
src/Factories/Covers/CoversNothing.php
Normal file
10
src/Factories/Covers/CoversNothing.php
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
|
namespace Pest\Factories\Covers;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @internal
|
||||||
|
*/
|
||||||
|
final class CoversNothing {}
|
||||||
@ -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,
|
||||||
[],
|
[],
|
||||||
|
|||||||
@ -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
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user