From dec9cdb8a944cd876910fde723ad20e93651e3aa Mon Sep 17 00:00:00 2001 From: Meghdad <61308304+MeghdadFadaee@users.noreply.github.com> Date: Sun, 4 Oct 2026 20:52:47 +0330 Subject: [PATCH] Fix CI setup and formatting test --- .github/workflows/run-tests.yml | 5 +++++ phpunit.xml.dist | 7 +------ tests/FormatTest.php | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/run-tests.yml b/.github/workflows/run-tests.yml index 88083b1..9217d2f 100755 --- a/.github/workflows/run-tests.yml +++ b/.github/workflows/run-tests.yml @@ -46,6 +46,7 @@ jobs: php-version: ${{ matrix.php }} extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, bcmath, soap, intl, gd, exif, iconv, imagick coverage: none + tools: composer:v2 - name: Setup problem matchers run: | @@ -55,6 +56,10 @@ jobs: - name: Install dependencies run: | composer require "laravel/framework:${{ matrix.laravel }}" "orchestra/testbench:${{ matrix.testbench }}" --no-interaction --no-update + # PHPUnit 12+ no longer discovers the existing @test annotations. + composer require --dev "phpunit/phpunit:^9.5|^10.0|^11.0" --no-interaction --no-update + # Allow compatibility testing against older dependency versions in CI only. + composer config audit.block-insecure false composer update --${{ matrix.dependency-version }} --prefer-dist --no-interaction - name: Execute tests diff --git a/phpunit.xml.dist b/phpunit.xml.dist index 812fb01..cc1dbbc 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -1,10 +1,5 @@ - - - - src/ - - + ./tests/ diff --git a/tests/FormatTest.php b/tests/FormatTest.php index 7e8e3ad..2e7428a 100644 --- a/tests/FormatTest.php +++ b/tests/FormatTest.php @@ -115,7 +115,7 @@ class FormatTest extends TestCase { $datetime = Jalali::parse('1398-10-11 21:32:35')->formatWord('l d S F'); - $this->assertEquals('چهارشنبه یازده ام دی', $datetime); + $this->assertEquals('چهارشنبه یازده م دی', $datetime); } public function testFormatQuarter()