Skip to content

Commit

Permalink
Allow orchestra/testbench 9.0 and nesbot/carbon 3.4 in tests action (#…
Browse files Browse the repository at this point in the history
…309)

* Allow orchestra/testbench 9.0 and nesbot/carbon 3.4 in tests action

* Rector Rectify

* Update tests.yml

* Update tests.yml

---------

Co-authored-by: zingimmick <zingimmick@users.noreply.github.com>
  • Loading branch information
zingimmick and zingimmick authored Dec 2, 2024
1 parent cfbbd60 commit ecb6d8a
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 14 deletions.
16 changes: 6 additions & 10 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,17 +33,13 @@ jobs:
- name: Setup problem matchers for PHPUnit
run: echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json"

- if: matrix.php == '8.1'
name: Require packages for PHP 8.1
run: composer require orchestra/testbench:'^6.23 || ^7.0 || ^8.0' ramsey/collection:^1.2 --no-update --dev
- if: matrix.php >= '8.1'
name: Require packages for PHP greater than 8.1
run: composer require orchestra/testbench:'^6.23 || ^7.0 || ^8.0 || ^9.0' ramsey/collection:'^1.2 || ^2.0' --no-update --dev

- if: matrix.php == '8.2'
name: Require packages for PHP 8.2
run: composer require orchestra/testbench:'^6.23 || ^7.0 || ^8.0' ramsey/collection:^1.2 nesbot/carbon:^2.62.1 --no-update --dev

- if: matrix.php == '8.3'
name: Require packages for PHP 8.3
run: composer require orchestra/testbench:'^6.23 || ^7.0 || ^8.0' ramsey/collection:^1.2 nesbot/carbon:^2.62.1 --no-update --dev
- if: matrix.php >= '8.2'
name: Require packages for PHP greater than 8.2
run: composer require nesbot/carbon:'^2.62.1 || ^3.4' --no-update --dev

- name: Install dependencies
uses: ramsey/composer-install@v3
Expand Down
8 changes: 4 additions & 4 deletions tests/CommandTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,15 +36,15 @@ public function testCommand(): void
false
)
->assertExitCode(0);
$this->assertSame(config('sms.default'), 'default');
$this->assertSame('default', config('sms.default'));
$this->artisan(SmsSwitchConnectionCommand::class, [
'connection' => 'default-2',
])->expectsQuestion(
'This maybe invalidate existing sms feature. Are you sure you want to override the sms default connection?',
true
)
->assertExitCode(0);
$this->assertSame(config('sms.default'), 'default-2');
$this->assertSame('default-2', config('sms.default'));
$this->artisan(SmsSwitchConnectionCommand::class, [
'connection' => null,
])
Expand All @@ -68,7 +68,7 @@ public function testAlwaysNo(): void
'--always-no' => 1,
]
)->expectsOutput('Sms default connection already exists. Skipping...');
$this->assertSame(config('sms.default'), 'default');
$this->assertSame('default', config('sms.default'));
}

public function testForce(): void
Expand All @@ -82,7 +82,7 @@ public function testForce(): void
'--force' => true,
])
->assertExitCode(0);
$this->assertSame(config('sms.default'), 'default-2');
$this->assertSame('default-2', config('sms.default'));
}

private function envPath(): string
Expand Down

0 comments on commit ecb6d8a

Please sign in to comment.