mirror of
https://github.com/pestphp/pest.git
synced 2026-03-06 07:47:22 +01:00
refactor: renames traits
This commit is contained in:
@ -9,7 +9,7 @@ use Pest\Expectation;
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
trait Expectations
|
||||
trait Expectable
|
||||
{
|
||||
/**
|
||||
* Creates a new expectation.
|
||||
@ -17,7 +17,7 @@ use Throwable;
|
||||
*
|
||||
* @internal
|
||||
*/
|
||||
trait TestCase
|
||||
trait Testable
|
||||
{
|
||||
/**
|
||||
* The test case description. Contains the first
|
||||
@ -79,8 +79,8 @@ final class TestCaseFactory
|
||||
* @var array <int, string>
|
||||
*/
|
||||
public $traits = [
|
||||
Concerns\TestCase::class,
|
||||
Concerns\Expectations::class,
|
||||
Concerns\Testable::class,
|
||||
Concerns\Expectable::class,
|
||||
];
|
||||
|
||||
/**
|
||||
|
||||
@ -4,7 +4,7 @@ declare(strict_types=1);
|
||||
|
||||
namespace Pest;
|
||||
|
||||
use Pest\Concerns\Expectations;
|
||||
use Pest\Concerns\Expectable;
|
||||
|
||||
/**
|
||||
* @internal
|
||||
@ -13,7 +13,7 @@ use Pest\Concerns\Expectations;
|
||||
*/
|
||||
final class HigherOrderExpectation
|
||||
{
|
||||
use Expectations;
|
||||
use Expectable;
|
||||
|
||||
/**
|
||||
* @var Expectation
|
||||
|
||||
@ -18,7 +18,7 @@ use DOMElement;
|
||||
use Exception;
|
||||
use function get_class;
|
||||
use function method_exists;
|
||||
use Pest\Concerns\TestCase;
|
||||
use Pest\Concerns\Testable;
|
||||
use PHPUnit\Framework\AssertionFailedError;
|
||||
use PHPUnit\Framework\ExceptionWrapper;
|
||||
use PHPUnit\Framework\SelfDescribing;
|
||||
@ -266,7 +266,7 @@ final class JUnit extends Printer implements TestListener
|
||||
/**
|
||||
* A test started.
|
||||
*
|
||||
* @param Test|TestCase $test
|
||||
* @param Test|Testable $test
|
||||
*/
|
||||
public function startTest(Test $test): void
|
||||
{
|
||||
|
||||
@ -5,7 +5,7 @@ declare(strict_types=1);
|
||||
namespace Pest\Logging;
|
||||
|
||||
use function getmypid;
|
||||
use Pest\Concerns\TestCase;
|
||||
use Pest\Concerns\Testable;
|
||||
use PHPUnit\Framework\AssertionFailedError;
|
||||
use PHPUnit\Framework\Test;
|
||||
use PHPUnit\Framework\TestResult;
|
||||
@ -109,7 +109,7 @@ final class TeamCity extends DefaultResultPrinter
|
||||
}
|
||||
|
||||
/**
|
||||
* @param Test|TestCase $test
|
||||
* @param Test|Testable $test
|
||||
*/
|
||||
public function startTest(Test $test): void
|
||||
{
|
||||
@ -127,7 +127,7 @@ final class TeamCity extends DefaultResultPrinter
|
||||
}
|
||||
|
||||
/**
|
||||
* @param Test|TestCase $test
|
||||
* @param Test|Testable $test
|
||||
*/
|
||||
public function endTest(Test $test, float $time): void
|
||||
{
|
||||
@ -144,7 +144,7 @@ final class TeamCity extends DefaultResultPrinter
|
||||
}
|
||||
|
||||
/**
|
||||
* @param Test|TestCase $test
|
||||
* @param Test|Testable $test
|
||||
*/
|
||||
public function addError(Test $test, Throwable $t, float $time): void
|
||||
{
|
||||
@ -154,7 +154,7 @@ final class TeamCity extends DefaultResultPrinter
|
||||
/**
|
||||
* @phpstan-ignore-next-line
|
||||
*
|
||||
* @param Test|TestCase $test
|
||||
* @param Test|Testable $test
|
||||
*/
|
||||
public function addWarning(Test $test, Warning $e, float $time): void
|
||||
{
|
||||
@ -208,6 +208,6 @@ final class TeamCity extends DefaultResultPrinter
|
||||
/** @var array<string, string> $uses */
|
||||
$uses = class_uses($test);
|
||||
|
||||
return in_array(TestCase::class, $uses, true);
|
||||
return in_array(Testable::class, $uses, true);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user