Skip to content
Draft
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
3 changes: 2 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,8 @@ jobs:
- name: Check composer.json
run: composer normalize --dry-run
- name: Run tests
run: vendor/bin/phpunit
run: |
vendor/bin/phpunit
- name: Run integration tests
run: vendor/bin/phpcs -s --standard=MO4 integrationtests/testfile.php
- name: Run PHPStan
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ composer.lock
/build/
.atoum.php
phpunit.xml
.phpunit.cache
.phpunit.result.cache
behat.yml

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
*
* @link https://github.com/mayflower/mo4-coding-standard
*/
abstract class AbstractMo4SniffUnitTest extends AbstractSniffTestCase
abstract class AbstractMo4SniffUnitTestCase extends AbstractSniffTestCase
{
/**
* Array or Array containing the test file as key and as value the key-value pairs with line number and number of#
Expand Down
4 changes: 2 additions & 2 deletions MO4/Tests/Arrays/ArrayDoubleArrowAlignmentUnitTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

namespace MO4\Tests\Arrays;

use MO4\Tests\AbstractMo4SniffUnitTest;
use MO4\Tests\AbstractMo4SniffUnitTestCase;

/**
* Unit test class for @see ArrayDoubleArrowAlignmentSniff
Expand All @@ -30,7 +30,7 @@
*
* @link https://github.com/mayflower/mo4-coding-standard
*/
final class ArrayDoubleArrowAlignmentUnitTest extends AbstractMo4SniffUnitTest
final class ArrayDoubleArrowAlignmentUnitTest extends AbstractMo4SniffUnitTestCase
{
protected $expectedErrorList = [
'ArrayDoubleArrowAlignmentUnitTest.pass.inc' => [],
Expand Down
4 changes: 2 additions & 2 deletions MO4/Tests/Arrays/MultiLineArrayUnitTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

namespace MO4\Tests\Arrays;

use MO4\Tests\AbstractMo4SniffUnitTest;
use MO4\Tests\AbstractMo4SniffUnitTestCase;

/**
* Unit test class for @see MultiLineArraySniff
Expand All @@ -30,7 +30,7 @@
*
* @link https://github.com/mayflower/mo4-coding-standard
*/
final class MultiLineArrayUnitTest extends AbstractMo4SniffUnitTest
final class MultiLineArrayUnitTest extends AbstractMo4SniffUnitTestCase
{
protected $expectedErrorList = [
'MultiLineArrayUnitTest.pass.inc' => [],
Expand Down
4 changes: 2 additions & 2 deletions MO4/Tests/Commenting/PropertyCommentUnitTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

namespace MO4\Tests\Commenting;

use MO4\Tests\AbstractMo4SniffUnitTest;
use MO4\Tests\AbstractMo4SniffUnitTestCase;

/**
* Unit test class for the AlphabeticalUseStatements sniff.
Expand All @@ -30,7 +30,7 @@
*
* @link https://github.com/mayflower/mo4-coding-standard
*/
final class PropertyCommentUnitTest extends AbstractMo4SniffUnitTest
final class PropertyCommentUnitTest extends AbstractMo4SniffUnitTestCase
{
protected $expectedErrorList = [
'PropertyCommentUnitTest.pass.inc' => [],
Expand Down
4 changes: 2 additions & 2 deletions MO4/Tests/Formatting/AlphabeticalUseStatementsUnitTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

namespace MO4\Tests\Formatting;

use MO4\Tests\AbstractMo4SniffUnitTest;
use MO4\Tests\AbstractMo4SniffUnitTestCase;

/**
* Unit test class for the AlphabeticalUseStatements sniff.
Expand All @@ -30,7 +30,7 @@
*
* @link https://github.com/mayflower/mo4-coding-standard
*/
final class AlphabeticalUseStatementsUnitTest extends AbstractMo4SniffUnitTest
final class AlphabeticalUseStatementsUnitTest extends AbstractMo4SniffUnitTestCase
{
protected $expectedErrorList = [
'AlphabeticalUseStatementsUnitTest.pass.inc' => [],
Expand Down
4 changes: 2 additions & 2 deletions MO4/Tests/Formatting/UnnecessaryNamespaceUsageUnitTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

namespace MO4\Tests\Formatting;

use MO4\Tests\AbstractMo4SniffUnitTest;
use MO4\Tests\AbstractMo4SniffUnitTestCase;

/**
* Unit test class for the UnnecessaryNamespaceUsageUnitTest sniff.
Expand All @@ -32,7 +32,7 @@
*
* @link https://github.com/mayflower/mo4-coding-standard
*/
final class UnnecessaryNamespaceUsageUnitTest extends AbstractMo4SniffUnitTest
final class UnnecessaryNamespaceUsageUnitTest extends AbstractMo4SniffUnitTestCase
{
protected $expectedWarningList = [
'UnnecessaryNamespaceUsageUnitTest.pass.1.inc' => [],
Expand Down
4 changes: 2 additions & 2 deletions MO4/Tests/Strings/VariableInDoubleQuotedStringUnitTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

namespace MO4\Tests\Strings;

use MO4\Tests\AbstractMo4SniffUnitTest;
use MO4\Tests\AbstractMo4SniffUnitTestCase;

/**
* Unit test class for the VariableInDoubleQuotedString sniff.
Expand All @@ -30,7 +30,7 @@
*
* @link https://github.com/mayflower/mo4-coding-standard
*/
final class VariableInDoubleQuotedStringUnitTest extends AbstractMo4SniffUnitTest
final class VariableInDoubleQuotedStringUnitTest extends AbstractMo4SniffUnitTestCase
{
protected $expectedErrorList = [
'VariableInDoubleQuotedStringUnitTest.pass.inc' => [],
Expand Down
4 changes: 2 additions & 2 deletions MO4/Tests/WhiteSpace/ConstantSpacingUnitTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

namespace MO4\Tests\WhiteSpace;

use MO4\Tests\AbstractMo4SniffUnitTest;
use MO4\Tests\AbstractMo4SniffUnitTestCase;

/**
* Unit test class for the VariableInDoubleQuotedString sniff.
Expand All @@ -30,7 +30,7 @@
*
* @link https://github.com/mayflower/mo4-coding-standard
*/
final class ConstantSpacingUnitTest extends AbstractMo4SniffUnitTest
final class ConstantSpacingUnitTest extends AbstractMo4SniffUnitTestCase
{
protected $expectedErrorList = [
'ConstantSpacingUnitTest.pass.inc' => [],
Expand Down
4 changes: 2 additions & 2 deletions MO4/Tests/WhiteSpace/MultipleEmptyLinesUnitTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

namespace MO4\Tests\WhiteSpace;

use MO4\Tests\AbstractMo4SniffUnitTest;
use MO4\Tests\AbstractMo4SniffUnitTestCase;

/**
* Unit test class for the MultipleEmptyLines sniff.
Expand All @@ -30,7 +30,7 @@
*
* @link https://github.com/mayflower/mo4-coding-standard
*/
final class MultipleEmptyLinesUnitTest extends AbstractMo4SniffUnitTest
final class MultipleEmptyLinesUnitTest extends AbstractMo4SniffUnitTestCase
{
protected $expectedErrorList = [
'MultipleEmptyLinesUnitTest.pass.inc' => [],
Expand Down
3 changes: 1 addition & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,10 @@
},
"require-dev": {
"ergebnis/composer-normalize": "^2.45",
"nikic/php-parser": "< 5.0.1",
"phan/phan": "^6.0.0",
"phpstan/phpstan": "^2.0",
"phpstan/phpstan-strict-rules": "^2.0",
"phpunit/phpunit": "> 9.6.15 < 9.6.33",
"phpunit/phpunit": "^10.5.62 || ^11.5.51",
"psalm/plugin-phpunit": "^0.19",
"sabre/event": ">= 5.1.6",
"symfony/filesystem": ">= 5.4.45",
Expand Down
7 changes: 4 additions & 3 deletions phpunit.xml.dist
Original file line number Diff line number Diff line change
@@ -1,19 +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/11.5/phpunit.xsd"
backupGlobals="true"
beStrictAboutTestsThatDoNotTestAnything="false"
bootstrap="tests/bootstrap.php"
cacheDirectory=".phpunit.cache"
>
<testsuites>
<testsuite name="MO4 Ruleset Test Suite">
<directory>MO4/Tests</directory>
</testsuite>
</testsuites>
<coverage processUncoveredFiles="false">
<source>
<include>
<directory suffix=".php">./MO4/Sniffs</directory>
</include>
</coverage>
</source>
</phpunit>
Loading