Skip to content

Commit

Permalink
Merge pull request #181 from spatie/php-8.1
Browse files Browse the repository at this point in the history
Use PHPUnit 8 for PHP >= 8.1
  • Loading branch information
kylekatarnls committed Nov 25, 2021
2 parents e8d3417 + c4c6e24 commit 693149d
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 11 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,9 @@ jobs:

- name: Install dependencies
if: steps.composer-cache.outputs.cache-hit != 'true'
run: composer update --prefer-dist --no-progress --no-suggest --prefer-${{ matrix.setup || 'stable' }} ${{ matrix.php >= 8 && '--ignore-platform-req=php' || '' }}
run: |
${{ matrix.php >= 8.1 && 'composer require --no-update phpunit/phpunit:^8.5.14 --no-interaction;' || '' }}
composer update --prefer-dist --no-progress --no-suggest --prefer-${{ matrix.setup || 'stable' }} ${{ matrix.php >= 8 && '--ignore-platform-req=php' || '' }}
- name: Run test suite
run: vendor/bin/phpunit --no-coverage
3 changes: 3 additions & 0 deletions phpunit.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@
<directory suffix=".php">src/</directory>
</whitelist>
</filter>
<php>
<ini name="date.timezone" value="UTC"/>
</php>
<logging>
<log type="tap" target="build/report.tap"/>
<log type="junit" target="build/report.junit.xml"/>
Expand Down
5 changes: 0 additions & 5 deletions tests/OpeningHoursCustomClassTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,6 @@

class OpeningHoursCustomClassTest extends TestCase
{
protected function setUp()
{
date_default_timezone_set('UTC');
}

/** @test */
public function it_can_use_immutable_date_time()
{
Expand Down
5 changes: 0 additions & 5 deletions tests/OpeningHoursTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,6 @@

class OpeningHoursTest extends TestCase
{
protected function setUp()
{
date_default_timezone_set('UTC');
}

/** @test */
public function it_can_return_the_opening_hours_for_a_regular_week()
{
Expand Down

0 comments on commit 693149d

Please sign in to comment.