mirror of
https://github.com/pestphp/pest.git
synced 2026-03-11 10:17:23 +01:00
refactor: generic attribute
This commit is contained in:
@ -4,6 +4,7 @@ declare(strict_types=1);
|
|||||||
|
|
||||||
namespace Pest;
|
namespace Pest;
|
||||||
|
|
||||||
|
use Attribute;
|
||||||
use BadMethodCallException;
|
use BadMethodCallException;
|
||||||
use Closure;
|
use Closure;
|
||||||
use InvalidArgumentException;
|
use InvalidArgumentException;
|
||||||
@ -837,7 +838,7 @@ final class Expectation
|
|||||||
/**
|
/**
|
||||||
* Asserts that the given expectation target to have the given attribute.
|
* Asserts that the given expectation target to have the given attribute.
|
||||||
*
|
*
|
||||||
* @param class-string $attribute
|
* @param class-string<Attribute> $attribute
|
||||||
*/
|
*/
|
||||||
public function toHaveAttribute(string $attribute): ArchExpectation
|
public function toHaveAttribute(string $attribute): ArchExpectation
|
||||||
{
|
{
|
||||||
|
|||||||
@ -4,6 +4,7 @@ declare(strict_types=1);
|
|||||||
|
|
||||||
namespace Pest\Expectations;
|
namespace Pest\Expectations;
|
||||||
|
|
||||||
|
use Attribute;
|
||||||
use Pest\Arch\Contracts\ArchExpectation;
|
use Pest\Arch\Contracts\ArchExpectation;
|
||||||
use Pest\Arch\Expectations\Targeted;
|
use Pest\Arch\Expectations\Targeted;
|
||||||
use Pest\Arch\Expectations\ToBeUsedIn;
|
use Pest\Arch\Expectations\ToBeUsedIn;
|
||||||
@ -381,7 +382,7 @@ final class OppositeExpectation
|
|||||||
/**
|
/**
|
||||||
* Asserts that the given expectation target not to have the given attribute.
|
* Asserts that the given expectation target not to have the given attribute.
|
||||||
*
|
*
|
||||||
* @param class-string $attribute
|
* @param class-string<Attribute> $attribute
|
||||||
*/
|
*/
|
||||||
public function toHaveAttribute(string $attribute): ArchExpectation
|
public function toHaveAttribute(string $attribute): ArchExpectation
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user