Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: migrate phpunit config #138

Merged
merged 1 commit into from
Feb 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"phpstan/phpstan": "^1.0.0",
"phpstan/phpstan-phpunit": "^1.0.0",
"phpstan/phpstan-strict-rules": "^1.0.0",
"phpunit/phpunit": "^10.0"
"phpunit/phpunit": "^10.1"
},
"config": {
"allow-plugins": {
Expand Down
27 changes: 19 additions & 8 deletions phpunit.xml.dist
Original file line number Diff line number Diff line change
@@ -1,19 +1,30 @@
<?xml version="1.0"?>
<?xml version="1.0" encoding="UTF-8"?>
<phpunit
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="vendor/phpunit/phpunit/phpunit.xsd"
beStrictAboutChangesToGlobalState="true"
beStrictAboutOutputDuringTests="true"
beStrictAboutTodoAnnotatedTests="true"
colors="true"
bootstrap="tests/bootstrap.php"
colors="true"
requireCoverageMetadata="true"
failOnRisky="true"
cacheDirectory=".phpunit.cache"
displayDetailsOnTestsThatTriggerDeprecations="true"
displayDetailsOnTestsThatTriggerWarnings="true"
failOnWarning="true"
failOnIncomplete="true"
failOnEmptyTestSuite="true"
>
<coverage>
<testsuites>
<testsuite name="Tests">
<directory>tests</directory>
</testsuite>
</testsuites>

<source>
<include>
<directory suffix=".php">src/</directory>
<directory>./src</directory>
</include>
</coverage>
<testsuite name="Cdn77 Coding Standard">
<directory>tests</directory>
</testsuite>
</source>
</phpunit>
2 changes: 2 additions & 0 deletions tests/Sniffs/NamingConventions/ValidConstantNameSniffTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,15 @@
namespace Cdn77\Sniffs\NamingConventions;

use Cdn77\TestCase;
use PHPUnit\Framework\Attributes\CoversClass;

use function array_keys;
use function count;
use function json_encode;

use const JSON_THROW_ON_ERROR;

#[CoversClass(ValidConstantNameSniff::class)]
class ValidConstantNameSniffTest extends TestCase
{
public function testErrors(): void
Expand Down
2 changes: 2 additions & 0 deletions tests/Sniffs/NamingConventions/ValidVariableNameSniffTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,15 @@
namespace Cdn77\Sniffs\NamingConventions;

use Cdn77\TestCase;
use PHPUnit\Framework\Attributes\CoversClass;

use function array_keys;
use function is_array;
use function json_encode;

use const JSON_THROW_ON_ERROR;

#[CoversClass(ValidVariableNameSniff::class)]
class ValidVariableNameSniffTest extends TestCase
{
public function testErrors(): void
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,14 @@
namespace Cdn77\Sniffs\Ordering;

use Cdn77\TestCase;
use PHPUnit\Framework\Attributes\CoversClass;

use function array_keys;
use function json_encode;

use const JSON_THROW_ON_ERROR;

#[CoversClass(AlphabeticallyOrderedConstantsSniff::class)]
final class AlphabeticallyOrderedConstantsSniffTest extends TestCase
{
public function testErrors(): void
Expand Down
Loading