Browse Source

Add warnings for slow tests in PHPUnit

This should help in fixing slow tests down the road.
microsub
J. King 7 years ago
parent
commit
6b1cd3816d
  1. 5
      composer.json
  2. 147
      composer.lock
  3. 8
      tests/phpunit.xml

5
composer.json

@ -17,6 +17,8 @@
}
],
"minimum-stability": "dev",
"prefer-stable": true,
"require": {
"php": "^7.0",
"ext-intl": "*",
@ -36,7 +38,8 @@
"phpdocumentor/phpdocumentor": "2.*",
"friendsofphp/php-cs-fixer": "^2.2",
"phing/phing": "^2.16",
"pear/archive_tar": "*"
"pear/archive_tar": "*",
"johnkary/phpunit-speedtrap": "^2.0"
},
"autoload": {
"psr-4": {

147
composer.lock

@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file",
"This file is @generated automatically"
],
"content-hash": "1193e4106b6c84c545e6091560214ad5",
"content-hash": "2a8e077ce9d05d304c9041be28d1154e",
"packages": [
{
"name": "docopt/docopt",
@ -54,16 +54,16 @@
},
{
"name": "fguillot/picofeed",
"version": "v0.1.35",
"version": "v0.1.37",
"source": {
"type": "git",
"url": "https://github.com/miniflux/picoFeed.git",
"reference": "3a27b47de31eedec075c719f961783c5db7a7b08"
"reference": "402b7f07629577e7929625e78bc88d3d5831a22d"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/miniflux/picoFeed/zipball/3a27b47de31eedec075c719f961783c5db7a7b08",
"reference": "3a27b47de31eedec075c719f961783c5db7a7b08",
"url": "https://api.github.com/repos/miniflux/picoFeed/zipball/402b7f07629577e7929625e78bc88d3d5831a22d",
"reference": "402b7f07629577e7929625e78bc88d3d5831a22d",
"shasum": ""
},
"require": {
@ -103,7 +103,7 @@
],
"description": "Modern library to handle RSS/Atom feeds",
"homepage": "https://github.com/miniflux/picoFeed",
"time": "2017-06-20T22:54:47+00:00"
"time": "2017-11-02T03:20:36+00:00"
},
{
"name": "hosteurope/password-generator",
@ -192,16 +192,16 @@
},
{
"name": "phpseclib/phpseclib",
"version": "2.0.6",
"version": "2.0.7",
"source": {
"type": "git",
"url": "https://github.com/phpseclib/phpseclib.git",
"reference": "34a7699e6f31b1ef4035ee36444407cecf9f56aa"
"reference": "f4b6a522dfa1fd1e477c9cfe5909d5b31f098c0b"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/phpseclib/phpseclib/zipball/34a7699e6f31b1ef4035ee36444407cecf9f56aa",
"reference": "34a7699e6f31b1ef4035ee36444407cecf9f56aa",
"url": "https://api.github.com/repos/phpseclib/phpseclib/zipball/f4b6a522dfa1fd1e477c9cfe5909d5b31f098c0b",
"reference": "f4b6a522dfa1fd1e477c9cfe5909d5b31f098c0b",
"shasum": ""
},
"require": {
@ -280,7 +280,7 @@
"x.509",
"x509"
],
"time": "2017-06-05T06:31:10+00:00"
"time": "2017-10-23T05:04:54+00:00"
},
{
"name": "zendframework/zendxml",
@ -760,16 +760,16 @@
},
{
"name": "friendsofphp/php-cs-fixer",
"version": "v2.2.8",
"version": "v2.2.9",
"source": {
"type": "git",
"url": "https://github.com/FriendsOfPHP/PHP-CS-Fixer.git",
"reference": "aca23e791784eade7b377d578d6dfc6fcf1398d2"
"reference": "eace538b022a2b7db59ef7b5460cb8c66cb20b50"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/FriendsOfPHP/PHP-CS-Fixer/zipball/aca23e791784eade7b377d578d6dfc6fcf1398d2",
"reference": "aca23e791784eade7b377d578d6dfc6fcf1398d2",
"url": "https://api.github.com/repos/FriendsOfPHP/PHP-CS-Fixer/zipball/eace538b022a2b7db59ef7b5460cb8c66cb20b50",
"reference": "eace538b022a2b7db59ef7b5460cb8c66cb20b50",
"shasum": ""
},
"require": {
@ -780,17 +780,17 @@
"gecko-packages/gecko-php-unit": "^2.0",
"php": "^5.3.6 || >=7.0 <7.3",
"sebastian/diff": "^1.4",
"symfony/console": "^2.4 || ^3.0",
"symfony/event-dispatcher": "^2.1 || ^3.0",
"symfony/filesystem": "^2.4 || ^3.0",
"symfony/finder": "^2.2 || ^3.0",
"symfony/options-resolver": "^2.6 || ^3.0",
"symfony/console": "^2.4 || ^3.0 || ^4.0",
"symfony/event-dispatcher": "^2.1 || ^3.0 || ^4.0",
"symfony/filesystem": "^2.4 || ^3.0 || ^4.0",
"symfony/finder": "^2.2 || ^3.0 || ^4.0",
"symfony/options-resolver": "^2.6 || ^3.0 || ^4.0",
"symfony/polyfill-php54": "^1.0",
"symfony/polyfill-php55": "^1.3",
"symfony/polyfill-php70": "^1.0",
"symfony/polyfill-php72": "^1.4",
"symfony/process": "^2.3 || ^3.0",
"symfony/stopwatch": "^2.5 || ^3.0"
"symfony/process": "^2.3 || ^3.0 || ^4.0",
"symfony/stopwatch": "^2.5 || ^3.0 || ^4.0"
},
"conflict": {
"hhvm": "<3.18"
@ -798,9 +798,9 @@
"require-dev": {
"johnkary/phpunit-speedtrap": "^1.0.1",
"justinrainbow/json-schema": "^5.0",
"php-coveralls/php-coveralls": "^1.0.2",
"phpunit/phpunit": "^4.8.35 || ^5.4.3",
"satooshi/php-coveralls": "^1.0",
"symfony/phpunit-bridge": "^3.2.2"
"symfony/phpunit-bridge": "^3.2.2 || ^4.0"
},
"suggest": {
"ext-mbstring": "For handling non-UTF8 characters in cache signature.",
@ -841,7 +841,7 @@
}
],
"description": "A tool to automatically fix PHP code style",
"time": "2017-09-29T15:07:49+00:00"
"time": "2017-11-02T12:46:49+00:00"
},
{
"name": "gecko-packages/gecko-php-unit",
@ -1136,16 +1136,16 @@
},
{
"name": "jms/serializer",
"version": "1.9.0",
"version": "1.9.1",
"source": {
"type": "git",
"url": "https://github.com/schmittjoh/serializer.git",
"reference": "f4683f41ebf21e60667447bb49939bee35807c3c"
"reference": "e708d6ef549044974b60a57fdcec2fa165436d57"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/schmittjoh/serializer/zipball/f4683f41ebf21e60667447bb49939bee35807c3c",
"reference": "f4683f41ebf21e60667447bb49939bee35807c3c",
"url": "https://api.github.com/repos/schmittjoh/serializer/zipball/e708d6ef549044974b60a57fdcec2fa165436d57",
"reference": "e708d6ef549044974b60a57fdcec2fa165436d57",
"shasum": ""
},
"require": {
@ -1215,7 +1215,55 @@
"serialization",
"xml"
],
"time": "2017-09-28T15:17:28+00:00"
"time": "2017-10-27T07:15:54+00:00"
},
{
"name": "johnkary/phpunit-speedtrap",
"version": "v2.0.0-BETA1",
"source": {
"type": "git",
"url": "https://github.com/johnkary/phpunit-speedtrap.git",
"reference": "cbd785f67116c581f71705342cb316631e5a2be9"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/johnkary/phpunit-speedtrap/zipball/cbd785f67116c581f71705342cb316631e5a2be9",
"reference": "cbd785f67116c581f71705342cb316631e5a2be9",
"shasum": ""
},
"require": {
"php": ">=7.0",
"phpunit/phpunit": "^6.0"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "2.0-dev"
}
},
"autoload": {
"psr-4": {
"JohnKary\\PHPUnit\\Listener\\": "src/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "John Kary",
"email": "john@johnkary.net"
}
],
"description": "Find slow tests in your PHPUnit test suite",
"homepage": "https://github.com/johnkary/phpunit-speedtrap",
"keywords": [
"phpunit",
"profile",
"slow"
],
"time": "2017-03-17T12:23:15+00:00"
},
{
"name": "justinrainbow/json-schema",
@ -1452,37 +1500,40 @@
},
{
"name": "myclabs/deep-copy",
"version": "1.6.1",
"version": "1.7.0",
"source": {
"type": "git",
"url": "https://github.com/myclabs/DeepCopy.git",
"reference": "8e6e04167378abf1ddb4d3522d8755c5fd90d102"
"reference": "3b8a3a99ba1f6a3952ac2747d989303cbd6b7a3e"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/8e6e04167378abf1ddb4d3522d8755c5fd90d102",
"reference": "8e6e04167378abf1ddb4d3522d8755c5fd90d102",
"url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/3b8a3a99ba1f6a3952ac2747d989303cbd6b7a3e",
"reference": "3b8a3a99ba1f6a3952ac2747d989303cbd6b7a3e",
"shasum": ""
},
"require": {
"php": ">=5.4.0"
"php": "^5.6 || ^7.0"
},
"require-dev": {
"doctrine/collections": "1.*",
"phpunit/phpunit": "~4.1"
"doctrine/collections": "^1.0",
"doctrine/common": "^2.6",
"phpunit/phpunit": "^4.1"
},
"type": "library",
"autoload": {
"psr-4": {
"DeepCopy\\": "src/DeepCopy/"
}
},
"files": [
"src/DeepCopy/deep_copy.php"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"description": "Create deep copies (clones) of your objects",
"homepage": "https://github.com/myclabs/DeepCopy",
"keywords": [
"clone",
"copy",
@ -1490,7 +1541,7 @@
"object",
"object graph"
],
"time": "2017-04-12T18:52:22+00:00"
"time": "2017-10-19T19:58:43+00:00"
},
{
"name": "nikic/php-parser",
@ -2489,16 +2540,16 @@
},
{
"name": "phpunit/php-code-coverage",
"version": "5.2.2",
"version": "5.2.3",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/php-code-coverage.git",
"reference": "8ed1902a57849e117b5651fc1a5c48110946c06b"
"reference": "8e1d2397d8adf59a3f12b2878a3aaa66d1ab189d"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/8ed1902a57849e117b5651fc1a5c48110946c06b",
"reference": "8ed1902a57849e117b5651fc1a5c48110946c06b",
"url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/8e1d2397d8adf59a3f12b2878a3aaa66d1ab189d",
"reference": "8e1d2397d8adf59a3f12b2878a3aaa66d1ab189d",
"shasum": ""
},
"require": {
@ -2507,7 +2558,7 @@
"php": "^7.0",
"phpunit/php-file-iterator": "^1.4.2",
"phpunit/php-text-template": "^1.2.1",
"phpunit/php-token-stream": "^1.4.11 || ^2.0",
"phpunit/php-token-stream": "^2.0",
"sebastian/code-unit-reverse-lookup": "^1.0.1",
"sebastian/environment": "^3.0",
"sebastian/version": "^2.0.1",
@ -2549,7 +2600,7 @@
"testing",
"xunit"
],
"time": "2017-08-03T12:40:43+00:00"
"time": "2017-11-03T13:47:33+00:00"
},
{
"name": "phpunit/php-file-iterator",
@ -5539,9 +5590,9 @@
}
],
"aliases": [],
"minimum-stability": "stable",
"minimum-stability": "dev",
"stability-flags": [],
"prefer-stable": false,
"prefer-stable": true,
"prefer-lowest": false,
"platform": {
"php": "^7.0",

8
tests/phpunit.xml

@ -18,6 +18,14 @@
<logging>
<log type="coverage-html" target="coverage" showUncoveredFiles="true"/>
</logging>
<listeners>
<listener class="JohnKary\PHPUnit\Listener\SpeedTrapListener">
<arguments><array>
<element key="slowThreshold"><integer>1500</integer></element>
<element key="reportLength"><integer>1000</integer></element>
</array></arguments>
</listener>
</listeners>
<testsuites>
<testsuite name="Exceptions">

Loading…
Cancel
Save