diff --git a/.github/workflows/continuous-integration.yml b/.github/workflows/continuous-integration.yml index 9d2beaf141..eb8a856000 100644 --- a/.github/workflows/continuous-integration.yml +++ b/.github/workflows/continuous-integration.yml @@ -59,4 +59,7 @@ jobs: - name: Run tests with PHPUnit run: | - vendor/bin/phpunit + echo ::group::Install + ./vendor/bin/simple-phpunit install + echo ::endgroup:: + ./vendor/bin/simple-phpunit diff --git a/composer.json b/composer.json index 52db7a5ae8..6ca6ab7c89 100644 --- a/composer.json +++ b/composer.json @@ -19,7 +19,7 @@ "require-dev": { "ext-intl": "*", "bamarni/composer-bin-plugin": "^1.4.1", - "phpunit/phpunit": "^7.5.20 || ^8.5.8 || ^9.4.2" + "symfony/phpunit-bridge": "^4.4 || ^5.2" }, "autoload": { "psr-4": { diff --git a/test/Faker/TestCase.php b/test/Faker/TestCase.php index 4522fab5cf..7ad6441b80 100644 --- a/test/Faker/TestCase.php +++ b/test/Faker/TestCase.php @@ -3,8 +3,6 @@ namespace Faker\Test; use Faker\Generator; -use PHPUnit\Framework\Constraint\LogicalNot; -use PHPUnit\Framework\Constraint\RegularExpression; use PHPUnit\Framework\TestCase as BaseTestCase; abstract class TestCase extends BaseTestCase @@ -24,34 +22,6 @@ protected function setUp(): void } } - /** - * Asserts that a string matches a given regular expression. - * - * @throws \PHPUnit\Framework\ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - */ - public static function assertMatchesRegularExpression(string $pattern, string $string, string $message = ''): void - { - self::assertThat($string, new RegularExpression($pattern), $message); - } - - /** - * Asserts that a string does not match a given regular expression. - * - * @throws \PHPUnit\Framework\ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - */ - public static function assertDoesNotMatchRegularExpression(string $pattern, string $string, string $message = ''): void - { - self::assertThat( - $string, - new LogicalNot( - new RegularExpression($pattern) - ), - $message - ); - } - public static function localeDataProvider(): array { $locales = [];