mirror of
https://github.com/pestphp/pest.git
synced 2026-03-09 09:17:23 +01:00
feat: toBeFinal
This commit is contained in:
@ -7,6 +7,7 @@ namespace Pest\Expectations;
|
||||
use Pest\Arch\Contracts\ArchExpectation;
|
||||
use Pest\Arch\Exceptions\ArchExpectationFailedException;
|
||||
use Pest\Arch\Expectations\NotToUseStrictTypes;
|
||||
use Pest\Arch\Expectations\ToBeFinal;
|
||||
use Pest\Arch\Expectations\ToBeUsedIn;
|
||||
use Pest\Arch\Expectations\ToBeUsedInNothing;
|
||||
use Pest\Arch\Expectations\ToUse;
|
||||
@ -83,6 +84,14 @@ final class OppositeExpectation
|
||||
return ToUseStrictTypes::make($this->original, false);
|
||||
}
|
||||
|
||||
/**
|
||||
* Asserts that the given expectation target is final.
|
||||
*/
|
||||
public function toBeFinal(): ArchExpectation
|
||||
{
|
||||
return ToBeFinal::make($this->original, false);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param array<int, string>|string $targets
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user