mirror of
https://github.com/pestphp/pest.git
synced 2026-03-05 23:37:22 +01:00
feat: show more useful exception when intl extension not found
This commit is contained in:
@ -15,6 +15,7 @@ use Pest\Arch\PendingArchExpectation;
|
|||||||
use Pest\Arch\SingleArchExpectation;
|
use Pest\Arch\SingleArchExpectation;
|
||||||
use Pest\Arch\Support\FileLineFinder;
|
use Pest\Arch\Support\FileLineFinder;
|
||||||
use Pest\Exceptions\InvalidExpectation;
|
use Pest\Exceptions\InvalidExpectation;
|
||||||
|
use Pest\Exceptions\MissingDependency;
|
||||||
use Pest\Expectation;
|
use Pest\Expectation;
|
||||||
use Pest\Support\Arr;
|
use Pest\Support\Arr;
|
||||||
use Pest\Support\Exporter;
|
use Pest\Support\Exporter;
|
||||||
@ -284,6 +285,10 @@ final readonly class OppositeExpectation
|
|||||||
*/
|
*/
|
||||||
public function toHaveSuspiciousCharacters(): ArchExpectation
|
public function toHaveSuspiciousCharacters(): ArchExpectation
|
||||||
{
|
{
|
||||||
|
if (! class_exists(Spoofchecker::class)) {
|
||||||
|
throw new MissingDependency(__FUNCTION__, 'ext-intl >= 2.0');
|
||||||
|
}
|
||||||
|
|
||||||
$checker = new Spoofchecker;
|
$checker = new Spoofchecker;
|
||||||
|
|
||||||
/** @var Expectation<array<int, string>|string> $original */
|
/** @var Expectation<array<int, string>|string> $original */
|
||||||
|
|||||||
Reference in New Issue
Block a user