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

FriendsOfPHP / PHP-CS-Fixer / 12776
78%
master: 93%

Build:
Build:
LAST BUILD BRANCH: phpdocAlignFixer
DEFAULT BRANCH: master
Ran 19 Nov 2017 01:50PM UTC
Jobs 1
Files 297
Run time 10s
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
12776

push

travis-ci

keradus
minor #3255 IntegrationTest: output exception stack trace (Slamdunk)

This PR was merged into the 2.7 branch.

Discussion
----------

IntegrationTest: output exception stack trace

Adding a simple `key(NULL)` in the `ArraySyntaxFixer` results in an undebaggable IntegrationTest message because the original problem's source is not explicited.
This PR adds the Exception stack trace to the IntegrationTest if errors occur.

`2.2` branch has completely different `implodeError` [content](https://github.com/FriendsOfPHP/PHP-CS-Fixer/blob/2.2/tests/Test/AbstractIntegrationTestCase.php#L335), had to put it in the `2.7`.

Before:
```
1) PhpCsFixer\Tests\IntegrationTest::testIntegration with data set #20 (PhpCsFixer\Tests\Test\IntegrationCase Object (...))
Errors reported during fixing of file "priority/array_syntax,binary_operator_spaces.test": 2: /tmp/PHP-CS-Fixer/tests/Fixtures/Integration/.tmp.php key() expects parameter 1 to be array, null given

Failed asserting that an array is empty.

/tmp/PHP-CS-Fixer/tests/Test/AbstractIntegrationTestCase.php:220
/tmp/PHP-CS-Fixer/tests/Test/AbstractIntegrationTestCase.php:120
```
After:
```
1) PhpCsFixer\Tests\IntegrationTest::testIntegration with data set #23 (PhpCsFixer\Tests\Test\IntegrationCase Object (...))
Errors reported during fixing of file "priority/array_syntax,binary_operator_spaces.test": 2: /tmp/PHP-CS-Fixer/tests/Fixtures/Integration/.tmp.php key() expects parameter 1 to be array, null given

#0 /tmp/PHP-CS-Fixer/vendor/symfony/phpunit-bridge/DeprecationErrorHandler.php(105): PHPUnit\Util\ErrorHandler::handleError(2, 'key() expects p...', '/mnt/home/tessa...', 93, Array)
#1 [internal function]: Symfony\Bridge\PhpUnit\DeprecationErrorHandler::Symfony\Bridge\PhpUnit\{closure}(2, 'key() expects p...', '/mnt/home/tessa...', 93, Array)
#2 /tmp/PHP-CS-Fixer/src/Fixer/ArrayNotation/ArraySyntaxFixer.php(93): key(NULL)
#3 /tmp/PHP-CS-Fixer/src/AbstractFixer.php(73): PhpCsFixer\Fixer\ArrayNotation\ArraySyntaxFixer->applyFix(Object(SplFileInfo), Object(PhpCsFixer\Tokenizer\Tokens))
#4 /tmp/PHP-CS-Fixer/src/Runner/Runner.php(188): PhpCsFixer\AbstractFixer->fix(Object(SplFileInfo), Object(PhpCsFixer\Tokenizer\Tokens))
#5 /tmp/PHP-CS-Fixer/src/Runner/Runner.php(131): PhpCsFixer\Runner\Runner->fixFile(Object(SplFileInfo), Object(PhpCsFixer\Linter\TokenizerLintingResult))
#6 /tmp/PHP-CS-Fixer/tests/Test/AbstractIntegrationTestCase.php(223): PhpCsFixer\Runner\Runner->fix()
#7 /tmp/PHP-CS-Fixer/tests/Test/AbstractIntegrationTestCase.php(132): PhpCsFixer\Tests\Test\AbstractIntegrationTestCase->doTest(Object(PhpCsFixer\Tests\Test\IntegrationCase))
#8 [internal function]: PhpCsFixer\Tests\Test\AbstractIntegrationTestCase->testIntegration(Object(PhpCsFixer\Tests\Test\IntegrationCase))
#9 /tmp/PHP-CS-Fixer/vendor/phpunit/phpunit/src/Framework/TestCase.php(1071): ReflectionMethod->invokeArgs(Object(PhpCsFixer\Tests\IntegrationTest), Array)
#10 /tmp/PHP-CS-Fixer/vendor/phpunit/phpunit/src/Framework/TestCase.php(939): PHPUnit\Framework\TestCase->runTest()
#11 /tmp/PHP-CS-Fixer/vendor/phpunit/phpunit/src/Framework/TestResult.php(698): PHPUnit\Framework\TestCase->runBare()
#12 /tmp/PHP-CS-Fixer/vendor/phpunit/phpunit/src/Framework/TestCase.php(894): PHPUnit\Framework\TestResult->run(Object(PhpCsFixer\Tests\IntegrationTest))
#13 /tmp/PHP-CS-Fixer/vendor/phpunit/phpunit/src/Framework/TestSuite.php(744): PHPUnit\Framework\TestCase->run(Object(PHPUnit\Framework\TestResult))
#14 /tmp/PHP-CS-Fixer/vendor/phpunit/phpunit/src/Framework/TestSuite.php(744): PHPUnit\Framework\TestSuite->run(Object(PHPUnit\Framework\TestResult))
#15 /tmp/PHP-CS-Fixer/vendor/phpunit/phpunit/src/TextUI/TestRunner.php(537): PHPUnit\Framework\TestSuite->run(Object(PHPUnit\Framework\TestResult))
#16 /tmp/PHP-CS-Fixer/vendor/phpunit/phpunit/src/TextUI/Command.php(195): PHPUnit\TextUI\TestRunner->doRun(Object(PHPUnit\Framework\TestSuite), Array, true)
#17 /tmp/PHP-CS-Fixer/vendor/phpunit/phpunit/src/TextUI/Command.php(148): PHPUnit\TextUI\Command->run(Array, true)
#18 /tmp/PHP-CS-Fixer/vendor/phpunit/phpunit/phpunit(53): PHPUnit\TextUI\Command::main()
#19 {main}

Failed asserting that an array is empty.

/tmp/PHP-CS-Fixer/tests/Test/AbstractIntegrationTestCase.php:228
/tmp/PHP-CS-Fixer/tests/Test/AbstractIntegrationTestCase.php:132
```

Commits
-------

bcec407d IntegrationTest: output exception stack trace

8292 of 10688 relevant lines covered (77.58%)

36.23 hits per line

Jobs
ID Job ID Ran Files Coverage
5 12776.5 (COLLECT_COVERAGE=1 SYMFONY_DEPRECATIONS_HELPER=weak) 19 Nov 2017 01:38PM UTC 0
77.58
Travis Job 12776.5
Source Files on build 12776
Detailed source file information is not available for this build.
  • Back to Repo
  • Travis Build #12776
  • 7f2cc9c6 on github
  • Prev Build on 2.7 (#12773)
  • Next Build on 2.7 (#12781)
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