Skip to content

Commit

Permalink
chore: update dependencies (#4012)
Browse files Browse the repository at this point in the history
* chore: phpunit 10

* chore: config

* Apply fixes from StyleCI

* chore: phpunit 11 (php 8.2 minimum requirement)

* feat: laravel 11

* Apply fixes from StyleCI

* feat: carbon v3

* fixes
  • Loading branch information
SychO9 authored Aug 6, 2024
1 parent 4b94735 commit d645126
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 26 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ composer.phar

.DS_Store
Thumbs.db
tests/.phpunit.cache
tests/.phpunit.result.cache
/tests/integration/tmp
.vagrant
Expand Down
5 changes: 2 additions & 3 deletions tests/integration/api/CanRequestCustomTimedStatisticsTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
use Flarum\Testing\integration\RetrievesAuthorizedUsers;
use Flarum\Testing\integration\TestCase;
use Flarum\User\User;
use PHPUnit\Framework\Attributes\Test;

class CanRequestCustomTimedStatisticsTest extends TestCase
{
Expand Down Expand Up @@ -60,9 +61,7 @@ protected function getDatabaseData(): array
];
}

/**
* @test
*/
#[Test]
public function can_request_timed_stats()
{
$time = $this->nowTime->copy();
Expand Down
5 changes: 2 additions & 3 deletions tests/integration/api/CanRequestLifetimeStatisticsTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
use Flarum\Testing\integration\RetrievesAuthorizedUsers;
use Flarum\Testing\integration\TestCase;
use Flarum\User\User;
use PHPUnit\Framework\Attributes\Test;

class CanRequestLifetimeStatisticsTest extends TestCase
{
Expand Down Expand Up @@ -59,9 +60,7 @@ protected function getDatabaseData(): array
];
}

/**
* @test
*/
#[Test]
public function can_request_lifetime_stats()
{
$response = $this->send(
Expand Down
5 changes: 2 additions & 3 deletions tests/integration/api/CanRequestTimedStatisticsTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
use Flarum\Testing\integration\RetrievesAuthorizedUsers;
use Flarum\Testing\integration\TestCase;
use Flarum\User\User;
use PHPUnit\Framework\Attributes\Test;

class CanRequestTimedStatisticsTest extends TestCase
{
Expand Down Expand Up @@ -59,9 +60,7 @@ protected function getDatabaseData(): array
];
}

/**
* @test
*/
#[Test]
public function can_request_timed_stats()
{
$time = $this->nowTime->copy();
Expand Down
12 changes: 5 additions & 7 deletions tests/phpunit.integration.xml
Original file line number Diff line number Diff line change
@@ -1,22 +1,20 @@
<?xml version="1.0" encoding="UTF-8"?>
<phpunit
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.3/phpunit.xsd"
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/10.5/phpunit.xsd"
backupGlobals="false"
backupStaticAttributes="false"
cacheDirectory=".phpunit.cache"
backupStaticProperties="false"
colors="true"
convertErrorsToExceptions="true"
convertNoticesToExceptions="true"
convertWarningsToExceptions="true"
processIsolation="true"
stopOnFailure="false"
bootstrap="../../../php-packages/testing/bootstrap/monorepo.php"
>
<coverage processUncoveredFiles="true">
<source>
<include>
<directory suffix=".php">../src/</directory>
</include>
</coverage>
</source>
<testsuites>
<testsuite name="Flarum Integration Tests">
<directory suffix="Test.php">./integration</directory>
Expand Down
15 changes: 5 additions & 10 deletions tests/phpunit.unit.xml
Original file line number Diff line number Diff line change
@@ -1,28 +1,23 @@
<?xml version="1.0" encoding="UTF-8"?>
<phpunit
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.3/phpunit.xsd"
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/10.5/phpunit.xsd"
backupGlobals="false"
backupStaticAttributes="false"
cacheDirectory=".phpunit.cache"
backupStaticProperties="false"
colors="true"
convertErrorsToExceptions="true"
convertNoticesToExceptions="true"
convertWarningsToExceptions="true"
processIsolation="false"
stopOnFailure="false"
bootstrap="../../../php-packages/testing/bootstrap/monorepo.php"
>
<coverage processUncoveredFiles="true">
<source>
<include>
<directory suffix=".php">../src/</directory>
</include>
</coverage>
</source>
<testsuites>
<testsuite name="Flarum Unit Tests">
<directory suffix="Test.php">./unit</directory>
</testsuite>
</testsuites>
<listeners>
<listener class="\Mockery\Adapter\Phpunit\TestListener" />
</listeners>
</phpunit>

0 comments on commit d645126

Please sign in to comment.