Skip to content

Commit

Permalink
Merge pull request #1981 from hemberger/phpunit-updates
Browse files Browse the repository at this point in the history
Fix PHPUnit deprecations
  • Loading branch information
hemberger authored Dec 13, 2024
2 parents cc37ab5 + 5b1ea21 commit 07bec22
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
7 changes: 5 additions & 2 deletions phpunit.xml
Original file line number Diff line number Diff line change
@@ -1,18 +1,21 @@
<?xml version="1.0" encoding="UTF-8"?>
<phpunit
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/10.1/phpunit.xsd"
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/11.5/phpunit.xsd"
beStrictAboutChangesToGlobalState="true"
bootstrap="src/bootstrap.php"
cacheDirectory=".phpunit.cache"
colors="true"
displayDetailsOnPhpunitDeprecations="true"
displayDetailsOnTestsThatTriggerDeprecations="true"
displayDetailsOnTestsThatTriggerErrors="true"
displayDetailsOnTestsThatTriggerNotices="true"
displayDetailsOnTestsThatTriggerWarnings="true"
executionOrder="depends,defects"
failOnDeprecation="true"
failOnEmptyTestSuite="true"
failOnNotice="true"
failOnPhpunitDeprecation="true"
failOnRisky="true"
failOnWarning="true"
requireCoverageMetadata="true">
Expand All @@ -24,7 +27,7 @@
<php>
<env name="DISABLE_PHPDI_COMPILATION" value="true" force="true" />
</php>
<coverage includeUncoveredFiles="true">
<coverage>
<report>
<clover outputFile="test/coverage/clover.xml" />
<text outputFile="php://stdout" showOnlySummary="true" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,12 @@

namespace SmrTest\Container;

use PHPUnit\Framework\Attributes\CoversTrait;
use PHPUnit\Framework\Attributes\CoversClass;
use PHPUnit\Framework\TestCase;
use Smr\Container\ResettableContainer;
use Smr\Container\ResettableContainerTrait;

#[CoversTrait(ResettableContainerTrait::class)]
class ResettableContainerTraitTest extends TestCase {
#[CoversClass(ResettableContainer::class)]
class ResettableContainerTest extends TestCase {

public function test_not_initialized_by_definition(): void {
$container = new ResettableContainer([
Expand Down

0 comments on commit 07bec22

Please sign in to comment.