• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

keradus / PHP-CS-Fixer / 2996
94%
1.11: 82%

Build:
Build:
LAST BUILD BRANCH: master
DEFAULT BRANCH: 1.11
Ran 04 Jul 2017 08:08PM UTC
Jobs 1
Files 276
Run time 12s
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

pending completion
2996

push

travis-ci

keradus
bug #2902 Fix test classes constructor (julienfalque)

This PR was merged into the 2.4-dev branch.

Discussion
----------

Fix test classes constructor

Changing PHPUnit's test classes constructor's signature breaks PHPUnit process, at least for tests that use a data provider. Here is an example with `BlankLineAfterOpeningTagFixerTest` extending the deprecated `AbstractFixerTestCase`:

**before**
```
 $ vendor/bin/phpunit --filter BlankLineAfterOpeningTagFixerTest
PHPUnit 5.7.21 by Sebastian Bergmann and contributors.

Testing
EE                                                                  2 / 2 (100%)

Time: 269 ms, Memory: 26.00MB

There were 2 errors:

1) PhpCsFixer\Tests\Fixer\PhpTag\BlankLineAfterOpeningTagFixerTest::testFix
ArgumentCountError: Too few arguments to function PhpCsFixer\Tests\Fixer\PhpTag\BlankLineAfterOpeningTagFixerTest::testFix(), 0 passed and at least 1 expected

.../tests/Fixer/PhpTag/BlankLineAfterOpeningTagFixerTest.php:34

2) PhpCsFixer\Tests\Fixer\PhpTag\BlankLineAfterOpeningTagFixerTest::testMessyWhitespaces
ArgumentCountError: Too few arguments to function PhpCsFixer\Tests\Fixer\PhpTag\BlankLineAfterOpeningTagFixerTest::testMessyWhitespaces(), 0 passed and at least 1 expected

.../tests/Fixer/PhpTag/BlankLineAfterOpeningTagFixerTest.php:118
```

**after**
```
 $ vendor/bin/phpunit --filter BlankLineAfterOpeningTagFixerTest
PHPUnit 5.7.21 by Sebastian Bergmann and contributors.

Testing
...........                                                       11 / 11 (100%)

Time: 282 ms, Memory: 26.00MB

OK (11 tests, 183 assertions)

Remaining deprecation notices (13)

The "PhpCsFixer\Test\AbstractFixerTestCase" class is deprecated. You should stop using it, as it will be removed in 3.0 version: 13x
    11x in BlankLineAfterOpeningTagFixerTest::__construct from PhpCsFixer\Tests\Fixer\PhpTag
    2x in ReflectionClass::newInstance
```

Commits
-------

29987022 Fix test classes constructor

7235 of 9287 relevant lines covered (77.9%)

32.33 hits per line

Jobs
ID Job ID Ran Files Coverage
4 2996.4 (COLLECT_COVERAGE=1) 04 Jul 2017 07:56PM UTC 0
77.9
Travis Job 2996.4
Source Files on build 2996
Detailed source file information is not available for this build.
  • Back to Repo
  • Travis Build #2996
  • 5212e8be on github
  • Prev Build on master (#2968)
  • Next Build on master (#3002)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc