From 4189080d81d53324d44399cea8684a800dd3eff2 Mon Sep 17 00:00:00 2001 From: Fred Emmott Date: Tue, 19 Aug 2014 08:47:19 -0700 Subject: [PATCH] Revert "Revert "Update and lock framework test dependencies"" Summary: Also: - Make the runner recognize risky tests - const-ify the static strings - re-record slim The HHVM Warnning/fatal patterns need more work - they've been broken for months (since we made warnings/fatals match PHP5). These should be in a separate diff. Reviewed By: @JoelMarcey Differential Revision: D1505766 --- hphp/test/.gitignore | 1 - hphp/test/frameworks/Framework.php | 10 +- hphp/test/frameworks/PHPUnitPatterns.php | 32 +- hphp/test/frameworks/Runner.php | 26 +- hphp/test/frameworks/Statuses.php | 1 + hphp/test/frameworks/composer.json | 14 +- hphp/test/frameworks/composer.lock | 1032 ++++++++++++++++++++++++++++++ hphp/test/frameworks/results/slim.expect | 16 +- hphp/test/frameworks/run.php | 4 +- 9 files changed, 1084 insertions(+), 52 deletions(-) create mode 100644 hphp/test/frameworks/composer.lock diff --git a/hphp/test/.gitignore b/hphp/test/.gitignore index 0dcd4bdbbd2..c1bc23695a4 100644 --- a/hphp/test/.gitignore +++ b/hphp/test/.gitignore @@ -11,7 +11,6 @@ *.log *.log.old /frameworks/composer.json.md5 -/frameworks/composer.lock /frameworks/composer.phar /frameworks/framework_downloads /frameworks/vendor diff --git a/hphp/test/frameworks/Framework.php b/hphp/test/frameworks/Framework.php index 8a654e32f6f..df9593e139a 100644 --- a/hphp/test/frameworks/Framework.php +++ b/hphp/test/frameworks/Framework.php @@ -304,7 +304,7 @@ class Framework { // Test name pattern can be different depending on the framework, // although most follow the default. $this->test_name_pattern = $test_name_pattern === null - ? PHPUnitPatterns::$test_name_pattern + ? PHPUnitPatterns::TEST_NAME_PATTERN : $test_name_pattern; } @@ -336,7 +336,7 @@ class Framework { private function setTestFilePattern(?string $test_file_pattern = null): void { $this->test_file_pattern = $test_file_pattern === null - ? PHPUnitPatterns::$test_file_pattern + ? PHPUnitPatterns::TEST_FILE_PATTERN : $test_file_pattern; } @@ -411,13 +411,13 @@ class Framework { if ($handle) { while (($line = fgets($handle)) !== false) { $line = rtrim($line, PHP_EOL); - if (preg_match(PHPUnitPatterns::$tests_ok_pattern, + if (preg_match(PHPUnitPatterns::TESTS_OK_PATTERN, $line, $match) === 1) { // We have ths pattern: OK (364 tests, 590 assertions) // We want the first match of digits preg_match("/[0-9]+(?= )/", $line, $match); $num_tests += (int) $match[0]; - } else if (preg_match(PHPUnitPatterns::$tests_failure_pattern, + } else if (preg_match(PHPUnitPatterns::TESTS_FAILURE_PATTERN, $line, $match) === 1) { // We have this pattern: Tests: 364, Assertions: 585, Errors: 5. // Break out each type into an array @@ -912,7 +912,7 @@ class Framework { } $contents = file_get_contents($testfile); $matches = null; - return preg_match_all(PHPUnitPatterns::$test_method_name_pattern, + return preg_match_all(PHPUnitPatterns::TEST_METHOD_NAME_PATTERN, $contents, $matches); } } diff --git a/hphp/test/frameworks/PHPUnitPatterns.php b/hphp/test/frameworks/PHPUnitPatterns.php index d25ca046a08..64ba995b153 100644 --- a/hphp/test/frameworks/PHPUnitPatterns.php +++ b/hphp/test/frameworks/PHPUnitPatterns.php @@ -8,7 +8,7 @@ class PHPUnitPatterns { // before a resulting " or ( // Four \\\\ needed to match one \ // stackoverflow.com/questions/4025482/cant-escape-the-backslash-with-regex - static string $test_name_pattern = + const string TEST_NAME_PATTERN = "/[_a-zA-Z0-9\\\\]*::[_a-zA-Z0-9]*( with data set (\".*?\"|#[0-9]+))?/"; // Matches: @@ -17,37 +17,37 @@ class PHPUnitPatterns { // . 252 / 364 ( 69%) // .\nWarning // That last example happened in Magento - static string $status_code_pattern = - "/^[\.SFEI]$|^S+$|^[\.SFEI](HipHop)|^[\.SFEI][ \t]*[0-9]* \/ [0-9]* \([ 0-9]*%\)/"; + const string STATUS_CHAR_GROUP = '[\.SFEIR]'; + const string STATUS_CODE_PATTERN = '/^'.self::STATUS_CHAR_GROUP.'$|^S+$|^'.self::STATUS_CHAR_GROUP.'(HipHop)|^'.self::STATUS_CHAR_GROUP.'[ \t]*[0-9]* \/ [0-9]* \([ 0-9]*%\)/'; // Don't want to parse any more test names after the Time line in the // results. Any test names after that line are probably detailed error // information. - static string $stop_parsing_pattern = + const string STOP_PARSING_PATTERN = "/^Time: \d+(\.\d+)? (second[s]?|ms|minute[s]?|hour[s]?), Memory: \d+(\.\d+)/"; - static string $tests_ok_pattern = "/^OK \(\d+ test[s]?, \d+ assertion[s]?\)/"; - static string $tests_failure_pattern = "/^Tests: \d+, Assertions: \d+.*[.]/"; + const string TESTS_OK_PATTERN = "/^OK \(\d+ test[s]?, \d+ assertion[s]?\)/"; + const string TESTS_FAILURE_PATTERN = "/^Tests: \d+, Assertions: \d+.*[.]/"; - static string $header_pattern = + const string HEADER_PATTERN = "/^PHPUnit \d+.[0-9a-zA-Z\-\.]*( by Sebastian Bergmann.)?/"; - static string $config_file_pattern = "/^Configuration read from/"; + const string CONFIG_FILE_PATTERN = "/^Configuration read from/"; - static string $xdebug_pattern = "/^The Xdebug extension is not loaded./"; + const string XDEBUG_PATTERN = "/^The Xdebug extension is not loaded./"; // Paris and Idiorm have tests with ending digits (e.g. Test53.php) - static string $test_file_pattern = + const string TEST_FILE_PATTERN = "/.*(\.phpt|Test[\d]*\.php|test[\d]*\.php)$/"; - static string $tests_ok_skipped_inc_pattern = + const string TESTS_OK_SKIPPED_INC_PATTERN = "/^OK, but incomplete, skipped, or risky tests!/"; - static string $num_errors_failures_pattern = + const string NUM_ERRORS_FAILURES_PATTERN = "/^There (was|were) \d+ (failure|error)[s]?\:/"; - static string $num_skips_inc_pattern = + const string NUM_SKIPS_INC_PATTERN = "/^There (was|were) \d+ (skipped|incomplete) test[s]?\:/"; - static string $failures_header_pattern = "/^FAILURES!/"; - static string $no_tests_executed_pattern = "/^No tests executed!/"; + const string FAILURES_HEADER_PATTERN = "/^FAILURES!/"; + const string NO_TESTS_EXECUTED_PATTERN = "/^No tests executed!/"; static string $hhvm_warning_pattern = "/^(HipHop|HHVM|hhvm) (Warning|Notice)/"; @@ -56,5 +56,5 @@ class PHPUnitPatterns { static string $phpunit_exception_with_hhvm_warning = "/^PHPUnit_Framework_Exception: (HipHop|HHVM|hhvm) (Warning|Notice)/"; - static string $test_method_name_pattern = "/public function test|\@test/"; + const string TEST_METHOD_NAME_PATTERN = "/public function test|\@test/"; } diff --git a/hphp/test/frameworks/Runner.php b/hphp/test/frameworks/Runner.php index 8926100b258..0e6868fe165 100644 --- a/hphp/test/frameworks/Runner.php +++ b/hphp/test/frameworks/Runner.php @@ -159,7 +159,7 @@ class Runner { continue; } } while (!feof($this->pipes[1]) && - preg_match(PHPUnitPatterns::$status_code_pattern, + preg_match(PHPUnitPatterns::STATUS_CODE_PATTERN, $status) === 0); // Test names should have all characters before and including __DIR__ // removed, so that specific user info is not added @@ -281,13 +281,13 @@ class Runner { // There was 1 failure: <---- Don't print // // 1) Assetic\Test\Asset\HttpAssetTest::testGetLastModified <---- print - if (preg_match(PHPUnitPatterns::$tests_ok_skipped_inc_pattern, + if (preg_match(PHPUnitPatterns::TESTS_OK_SKIPPED_INC_PATTERN, $line) === 1 || - preg_match(PHPUnitPatterns::$num_errors_failures_pattern, + preg_match(PHPUnitPatterns::NUM_ERRORS_FAILURES_PATTERN, $line) === 1 || - preg_match(PHPUnitPatterns::$failures_header_pattern, + preg_match(PHPUnitPatterns::FAILURES_HEADER_PATTERN, $line) === 1 || - preg_match(PHPUnitPatterns::$num_skips_inc_pattern, + preg_match(PHPUnitPatterns::NUM_SKIPS_INC_PATTERN, $line) === 1) { do { // throw out any blank lines after these pattern @@ -303,9 +303,9 @@ class Runner { // stat information is part of the information provided for a // given test error -- or -- we have hit a fatal at the very end of // running PHPUnit. For that fatal case, we handle that a bit differently. - if (preg_match(PHPUnitPatterns::$tests_ok_pattern, $line) === 1 || - preg_match(PHPUnitPatterns::$tests_failure_pattern, $line) === 1 || - preg_match(PHPUnitPatterns::$no_tests_executed_pattern, + if (preg_match(PHPUnitPatterns::TESTS_OK_PATTERN, $line) === 1 || + preg_match(PHPUnitPatterns::TESTS_FAILURE_PATTERN, $line) === 1 || + preg_match(PHPUnitPatterns::NO_TESTS_EXECUTED_PATTERN, $line) === 1) { $prev_line = $line; $line = $this->getLine(); @@ -380,7 +380,7 @@ class Runner { $this->stat_information = $this->name.PHP_EOL; if ($final_stats === null) { $this->stat_information .= Statuses::FATAL.PHP_EOL; - } else if (preg_match(PHPUnitPatterns::$no_tests_executed_pattern, + } else if (preg_match(PHPUnitPatterns::NO_TESTS_EXECUTED_PATTERN, $final_stats) === 1) { $this->stat_information .= Statuses::SKIP.PHP_EOL; } else { @@ -389,13 +389,13 @@ class Runner { } private function isStop(string $line) { - return preg_match(PHPUnitPatterns::$stop_parsing_pattern, $line) === 1; + return preg_match(PHPUnitPatterns::STOP_PARSING_PATTERN, $line) === 1; } private function isPrologue(string $line) { - return preg_match(PHPUnitPatterns::$header_pattern, $line) === 1 || - preg_match(PHPUnitPatterns::$config_file_pattern, $line) === 1 || - preg_match(PHPUnitPatterns::$xdebug_pattern, $line) === 1; + return preg_match(PHPUnitPatterns::HEADER_PATTERN, $line) === 1 || + preg_match(PHPUnitPatterns::CONFIG_FILE_PATTERN, $line) === 1 || + preg_match(PHPUnitPatterns::XDEBUG_PATTERN, $line) === 1; } private function isBlankLine(string $line): bool { diff --git a/hphp/test/frameworks/Statuses.php b/hphp/test/frameworks/Statuses.php index 07df6e0618d..d2fa2909c3d 100644 --- a/hphp/test/frameworks/Statuses.php +++ b/hphp/test/frameworks/Statuses.php @@ -8,6 +8,7 @@ class Statuses { const Status ERROR = "E"; const Status INCOMPLETE = "I"; const Status SKIP = "S"; + const Status RISKY = "R"; const Status TIMEOUT = "TIMEOUT"; const Status BLACKLIST = "BLACKLIST"; const Status CLOWNY = "CLOWNY"; diff --git a/hphp/test/frameworks/composer.json b/hphp/test/frameworks/composer.json index d0a70fc5eea..7fe38130f7b 100644 --- a/hphp/test/frameworks/composer.json +++ b/hphp/test/frameworks/composer.json @@ -1,10 +1,10 @@ { - "minimum-stability": "dev", - "require-dev": { - "phpunit/phpunit": "4.0.14", - "phpunit/php-invoker": "1.1.3", - "phpunit/dbunit": "1.2.3", - "phpunit/phpunit-selenium": "1.3.2", - "phpunit/phpunit-story": "1.0.2" + "require": { + "phpunit/phpunit": "4.2.*", + "phpunit/phpunit-mock-objects": "2.2.*", + "phpunit/php-invoker": "1.1.*", + "phpunit/dbunit": "1.3.*", + "phpunit/phpunit-selenium": "1.3.*", + "phpunit/phpunit-story": "1.0.*" } } diff --git a/hphp/test/frameworks/composer.lock b/hphp/test/frameworks/composer.lock new file mode 100644 index 00000000000..559308df02d --- /dev/null +++ b/hphp/test/frameworks/composer.lock @@ -0,0 +1,1032 @@ +{ + "_readme": [ + "This file locks the dependencies of your project to a known state", + "Read more about it at http://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", + "This file is @generated automatically" + ], + "hash": "8ffdb14c496f369eb23a9866ab7e6cc1", + "packages": [ + { + "name": "ocramius/instantiator", + "version": "1.1.1", + "source": { + "type": "git", + "url": "https://github.com/Ocramius/Instantiator.git", + "reference": "8aa99efa86c51319afc26d23254fe6a8b5a5144a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/Ocramius/Instantiator/zipball/8aa99efa86c51319afc26d23254fe6a8b5a5144a", + "reference": "8aa99efa86c51319afc26d23254fe6a8b5a5144a", + "shasum": "" + }, + "require": { + "ocramius/lazy-map": "1.0.*", + "php": "~5.3" + }, + "require-dev": { + "athletic/athletic": "~0.1.8", + "ext-pdo": "*", + "ext-phar": "*", + "phpunit/phpunit": "~4.0", + "squizlabs/php_codesniffer": "2.0.*@ALPHA" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0.x-dev" + } + }, + "autoload": { + "psr-0": { + "Instantiator\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Marco Pivetta", + "email": "ocramius@gmail.com", + "homepage": "http://ocramius.github.com/" + } + ], + "description": "A small, lightweight utility to instantiate objects in PHP without invoking their constructors", + "homepage": "https://github.com/Ocramius/Instantiator", + "keywords": [ + "constructor", + "instantiate" + ], + "time": "2014-08-11 23:48:35" + }, + { + "name": "ocramius/lazy-map", + "version": "1.0.0", + "source": { + "type": "git", + "url": "https://github.com/Ocramius/LazyMap.git", + "reference": "7fe3d347f5e618bcea7d39345ff83f3651d8b752" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/Ocramius/LazyMap/zipball/7fe3d347f5e618bcea7d39345ff83f3651d8b752", + "reference": "7fe3d347f5e618bcea7d39345ff83f3651d8b752", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "require-dev": { + "athletic/athletic": "~0.1.6", + "phpmd/phpmd": "1.5.*", + "phpunit/phpunit": ">=3.7", + "satooshi/php-coveralls": "~0.6", + "squizlabs/php_codesniffer": "1.4.*" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-0": { + "LazyMap\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Marco Pivetta", + "email": "ocramius@gmail.com", + "homepage": "http://ocramius.github.com/", + "role": "Developer" + } + ], + "description": "A library that provides lazy instantiation logic for a map of objects", + "homepage": "https://github.com/Ocramius/LazyMap", + "keywords": [ + "lazy", + "lazy instantiation", + "lazy loading", + "map", + "service location" + ], + "time": "2013-11-09 22:30:54" + }, + { + "name": "phpunit/dbunit", + "version": "1.3.1", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/dbunit.git", + "reference": "a5891b7a9c4f21587a51f9bc4e8f7042b741b480" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/dbunit/zipball/a5891b7a9c4f21587a51f9bc4e8f7042b741b480", + "reference": "a5891b7a9c4f21587a51f9bc4e8f7042b741b480", + "shasum": "" + }, + "require": { + "ext-pdo": "*", + "ext-simplexml": "*", + "php": ">=5.3.3", + "phpunit/phpunit": ">=3.7.0@stable", + "symfony/yaml": ">=2.1.0" + }, + "bin": [ + "composer/bin/dbunit" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.3.x-dev" + } + }, + "autoload": { + "classmap": [ + "PHPUnit/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "include-path": [ + "", + "../../symfony/yaml/" + ], + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sb@sebastian-bergmann.de", + "role": "lead" + } + ], + "description": "DbUnit port for PHP/PHPUnit to support database interaction testing.", + "homepage": "https://github.com/sebastianbergmann/dbunit/", + "keywords": [ + "database", + "testing", + "xunit" + ], + "time": "2014-03-26 11:25:06" + }, + { + "name": "phpunit/php-code-coverage", + "version": "2.0.10", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-code-coverage.git", + "reference": "6d196af48e8c100a3ae881940123e693da5a9217" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/6d196af48e8c100a3ae881940123e693da5a9217", + "reference": "6d196af48e8c100a3ae881940123e693da5a9217", + "shasum": "" + }, + "require": { + "php": ">=5.3.3", + "phpunit/php-file-iterator": "~1.3.1", + "phpunit/php-text-template": "~1.2.0", + "phpunit/php-token-stream": "~1.2.2", + "sebastian/environment": "~1.0.0", + "sebastian/version": "~1.0.3" + }, + "require-dev": { + "ext-xdebug": ">=2.1.4", + "phpunit/phpunit": "~4.0.14" + }, + "suggest": { + "ext-dom": "*", + "ext-xdebug": ">=2.2.1", + "ext-xmlwriter": "*" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "include-path": [ + "" + ], + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sb@sebastian-bergmann.de", + "role": "lead" + } + ], + "description": "Library that provides collection, processing, and rendering functionality for PHP code coverage information.", + "homepage": "https://github.com/sebastianbergmann/php-code-coverage", + "keywords": [ + "coverage", + "testing", + "xunit" + ], + "time": "2014-08-06 06:39:42" + }, + { + "name": "phpunit/php-file-iterator", + "version": "1.3.4", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-file-iterator.git", + "reference": "acd690379117b042d1c8af1fafd61bde001bf6bb" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/acd690379117b042d1c8af1fafd61bde001bf6bb", + "reference": "acd690379117b042d1c8af1fafd61bde001bf6bb", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "type": "library", + "autoload": { + "classmap": [ + "File/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "include-path": [ + "" + ], + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sb@sebastian-bergmann.de", + "role": "lead" + } + ], + "description": "FilterIterator implementation that filters files based on a list of suffixes.", + "homepage": "https://github.com/sebastianbergmann/php-file-iterator/", + "keywords": [ + "filesystem", + "iterator" + ], + "time": "2013-10-10 15:34:57" + }, + { + "name": "phpunit/php-invoker", + "version": "1.1.3", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-invoker.git", + "reference": "8696484458cb43eed025ab46260846de5b74655c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-invoker/zipball/8696484458cb43eed025ab46260846de5b74655c", + "reference": "8696484458cb43eed025ab46260846de5b74655c", + "shasum": "" + }, + "require": { + "ext-pcntl": "*", + "php": ">=5.2.7", + "phpunit/php-timer": ">=1.0.4,<1.1.0" + }, + "type": "library", + "autoload": { + "classmap": [ + "PHP/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "include-path": [ + "" + ], + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sb@sebastian-bergmann.de", + "role": "lead" + } + ], + "description": "Utility class for invoking callables with a timeout.", + "homepage": "https://github.com/sebastianbergmann/php-invoker/", + "keywords": [ + "process" + ], + "time": "2013-07-16 05:20:21" + }, + { + "name": "phpunit/php-text-template", + "version": "1.2.0", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-text-template.git", + "reference": "206dfefc0ffe9cebf65c413e3d0e809c82fbf00a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/206dfefc0ffe9cebf65c413e3d0e809c82fbf00a", + "reference": "206dfefc0ffe9cebf65c413e3d0e809c82fbf00a", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "type": "library", + "autoload": { + "classmap": [ + "Text/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "include-path": [ + "" + ], + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sb@sebastian-bergmann.de", + "role": "lead" + } + ], + "description": "Simple template engine.", + "homepage": "https://github.com/sebastianbergmann/php-text-template/", + "keywords": [ + "template" + ], + "time": "2014-01-30 17:20:04" + }, + { + "name": "phpunit/php-timer", + "version": "1.0.5", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-timer.git", + "reference": "19689d4354b295ee3d8c54b4f42c3efb69cbc17c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/19689d4354b295ee3d8c54b4f42c3efb69cbc17c", + "reference": "19689d4354b295ee3d8c54b4f42c3efb69cbc17c", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "type": "library", + "autoload": { + "classmap": [ + "PHP/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "include-path": [ + "" + ], + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sb@sebastian-bergmann.de", + "role": "lead" + } + ], + "description": "Utility class for timing", + "homepage": "https://github.com/sebastianbergmann/php-timer/", + "keywords": [ + "timer" + ], + "time": "2013-08-02 07:42:54" + }, + { + "name": "phpunit/php-token-stream", + "version": "1.2.2", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-token-stream.git", + "reference": "ad4e1e23ae01b483c16f600ff1bebec184588e32" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-token-stream/zipball/ad4e1e23ae01b483c16f600ff1bebec184588e32", + "reference": "ad4e1e23ae01b483c16f600ff1bebec184588e32", + "shasum": "" + }, + "require": { + "ext-tokenizer": "*", + "php": ">=5.3.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.2-dev" + } + }, + "autoload": { + "classmap": [ + "PHP/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "include-path": [ + "" + ], + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sb@sebastian-bergmann.de", + "role": "lead" + } + ], + "description": "Wrapper around PHP's tokenizer extension.", + "homepage": "https://github.com/sebastianbergmann/php-token-stream/", + "keywords": [ + "tokenizer" + ], + "time": "2014-03-03 05:10:30" + }, + { + "name": "phpunit/phpunit", + "version": "4.2.0", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/phpunit.git", + "reference": "58db726aa45fe26bca93f692cb3d77e9a46b7830" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/58db726aa45fe26bca93f692cb3d77e9a46b7830", + "reference": "58db726aa45fe26bca93f692cb3d77e9a46b7830", + "shasum": "" + }, + "require": { + "ext-dom": "*", + "ext-json": "*", + "ext-pcre": "*", + "ext-reflection": "*", + "ext-spl": "*", + "php": ">=5.3.3", + "phpunit/php-code-coverage": "~2.0", + "phpunit/php-file-iterator": "~1.3.1", + "phpunit/php-text-template": "~1.2", + "phpunit/php-timer": "~1.0.2", + "phpunit/phpunit-mock-objects": "~2.2", + "sebastian/comparator": "~1.0", + "sebastian/diff": "~1.1", + "sebastian/environment": "~1.0", + "sebastian/exporter": "~1.0", + "sebastian/version": "~1.0", + "symfony/yaml": "~2.0" + }, + "suggest": { + "phpunit/php-invoker": "~1.1" + }, + "bin": [ + "phpunit" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.2.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "include-path": [ + "", + "../../symfony/yaml/" + ], + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "The PHP Unit Testing framework.", + "homepage": "http://www.phpunit.de/", + "keywords": [ + "phpunit", + "testing", + "xunit" + ], + "time": "2014-08-08 05:13:30" + }, + { + "name": "phpunit/phpunit-mock-objects", + "version": "2.2.0", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/phpunit-mock-objects.git", + "reference": "42e589e08bc86e3e9bdf20d385e948347788505b" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit-mock-objects/zipball/42e589e08bc86e3e9bdf20d385e948347788505b", + "reference": "42e589e08bc86e3e9bdf20d385e948347788505b", + "shasum": "" + }, + "require": { + "ocramius/instantiator": "~1.0", + "php": ">=5.3.3", + "phpunit/php-text-template": "~1.2" + }, + "require-dev": { + "phpunit/phpunit": "4.2.*@dev" + }, + "suggest": { + "ext-soap": "*" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.2.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "include-path": [ + "" + ], + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sb@sebastian-bergmann.de", + "role": "lead" + } + ], + "description": "Mock Object library for PHPUnit", + "homepage": "https://github.com/sebastianbergmann/phpunit-mock-objects/", + "keywords": [ + "mock", + "xunit" + ], + "time": "2014-08-02 13:50:58" + }, + { + "name": "phpunit/phpunit-selenium", + "version": "1.3.3", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/phpunit-selenium.git", + "reference": "e89bfa1080dce9617c9b3e7760d50752974bfbd2" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit-selenium/zipball/e89bfa1080dce9617c9b3e7760d50752974bfbd2", + "reference": "e89bfa1080dce9617c9b3e7760d50752974bfbd2", + "shasum": "" + }, + "require": { + "ext-curl": "*", + "ext-dom": "*", + "php": ">=5.3.3", + "phpunit/phpunit": ">=3.7.0@stable" + }, + "type": "library", + "autoload": { + "classmap": [ + "PHPUnit/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "include-path": [ + "" + ], + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sb@sebastian-bergmann.de", + "role": "lead" + }, + { + "name": "Giorgio Sironi", + "email": "info@giorgiosironi.com", + "role": "developer" + } + ], + "description": "Selenium Server integration for PHPUnit", + "homepage": "http://www.phpunit.de/", + "keywords": [ + "selenium", + "testing", + "xunit" + ], + "time": "2013-11-22 08:54:11" + }, + { + "name": "phpunit/phpunit-story", + "version": "1.0.2", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/phpunit-story.git", + "reference": "b8579ada6ede4fd2f4b49e8549a8a176606cae68" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit-story/zipball/b8579ada6ede4fd2f4b49e8549a8a176606cae68", + "reference": "b8579ada6ede4fd2f4b49e8549a8a176606cae68", + "shasum": "" + }, + "require": { + "ext-spl": "*", + "php": ">=5.2.7", + "phpunit/phpunit": ">=3.6.0RC1@stable" + }, + "type": "library", + "autoload": { + "classmap": [ + "PHPUnit/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "include-path": [ + "" + ], + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sb@sebastian-bergmann.de", + "role": "lead" + } + ], + "description": "Story extension for PHPUnit to facilitate Behaviour-Driven Development.", + "homepage": "http://www.phpunit.de/", + "keywords": [ + "BDD", + "TDD", + "xunit" + ], + "time": "2013-04-02 16:07:28" + }, + { + "name": "sebastian/comparator", + "version": "1.0.0", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/comparator.git", + "reference": "f7069ee51fa9fb6c038e16a9d0e3439f5449dcf2" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/f7069ee51fa9fb6c038e16a9d0e3439f5449dcf2", + "reference": "f7069ee51fa9fb6c038e16a9d0e3439f5449dcf2", + "shasum": "" + }, + "require": { + "php": ">=5.3.3", + "sebastian/diff": "~1.1", + "sebastian/exporter": "~1.0" + }, + "require-dev": { + "phpunit/phpunit": "~4.1" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + }, + { + "name": "Jeff Welch", + "email": "whatthejeff@gmail.com" + }, + { + "name": "Volker Dusch", + "email": "github@wallbash.com" + }, + { + "name": "Bernhard Schussek", + "email": "bschussek@2bepublished.at" + } + ], + "description": "Provides the functionality to compare PHP values for equality", + "homepage": "http://www.github.com/sebastianbergmann/comparator", + "keywords": [ + "comparator", + "compare", + "equality" + ], + "time": "2014-05-02 07:05:58" + }, + { + "name": "sebastian/diff", + "version": "1.1.0", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/diff.git", + "reference": "1e091702a5a38e6b4c1ba9ca816e3dd343df2e2d" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/1e091702a5a38e6b4c1ba9ca816e3dd343df2e2d", + "reference": "1e091702a5a38e6b4c1ba9ca816e3dd343df2e2d", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.1-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + }, + { + "name": "Kore Nordmann", + "email": "mail@kore-nordmann.de" + } + ], + "description": "Diff implementation", + "homepage": "http://www.github.com/sebastianbergmann/diff", + "keywords": [ + "diff" + ], + "time": "2013-08-03 16:46:33" + }, + { + "name": "sebastian/environment", + "version": "1.0.0", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/environment.git", + "reference": "79517609ec01139cd7e9fded0dd7ce08c952ef6a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/79517609ec01139cd7e9fded0dd7ce08c952ef6a", + "reference": "79517609ec01139cd7e9fded0dd7ce08c952ef6a", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "require-dev": { + "phpunit/phpunit": "4.0.*@dev" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Provides functionality to handle HHVM/PHP environments", + "homepage": "http://www.github.com/sebastianbergmann/environment", + "keywords": [ + "Xdebug", + "environment", + "hhvm" + ], + "time": "2014-02-18 16:17:19" + }, + { + "name": "sebastian/exporter", + "version": "1.0.1", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/exporter.git", + "reference": "1f9a98e6f5dfe0524cb8c6166f7c82f3e9ae1529" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/1f9a98e6f5dfe0524cb8c6166f7c82f3e9ae1529", + "reference": "1f9a98e6f5dfe0524cb8c6166f7c82f3e9ae1529", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "require-dev": { + "phpunit/phpunit": "4.0.*@dev" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + }, + { + "name": "Jeff Welch", + "email": "whatthejeff@gmail.com" + }, + { + "name": "Volker Dusch", + "email": "github@wallbash.com" + }, + { + "name": "Adam Harvey", + "email": "aharvey@php.net", + "role": "Lead" + }, + { + "name": "Bernhard Schussek", + "email": "bschussek@2bepublished.at" + } + ], + "description": "Provides the functionality to export PHP variables for visualization", + "homepage": "http://www.github.com/sebastianbergmann/exporter", + "keywords": [ + "export", + "exporter" + ], + "time": "2014-02-16 08:26:31" + }, + { + "name": "sebastian/version", + "version": "1.0.3", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/version.git", + "reference": "b6e1f0cf6b9e1ec409a0d3e2f2a5fb0998e36b43" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/b6e1f0cf6b9e1ec409a0d3e2f2a5fb0998e36b43", + "reference": "b6e1f0cf6b9e1ec409a0d3e2f2a5fb0998e36b43", + "shasum": "" + }, + "type": "library", + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Library that helps with managing the version number of Git-hosted PHP projects", + "homepage": "https://github.com/sebastianbergmann/version", + "time": "2014-03-07 15:35:33" + }, + { + "name": "symfony/yaml", + "version": "v2.5.3", + "target-dir": "Symfony/Component/Yaml", + "source": { + "type": "git", + "url": "https://github.com/symfony/Yaml.git", + "reference": "5a75366ae9ca8b4792cd0083e4ca4dff9fe96f1f" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/Yaml/zipball/5a75366ae9ca8b4792cd0083e4ca4dff9fe96f1f", + "reference": "5a75366ae9ca8b4792cd0083e4ca4dff9fe96f1f", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.5-dev" + } + }, + "autoload": { + "psr-0": { + "Symfony\\Component\\Yaml\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Symfony Community", + "homepage": "http://symfony.com/contributors" + }, + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + } + ], + "description": "Symfony Yaml Component", + "homepage": "http://symfony.com", + "time": "2014-08-05 09:00:40" + } + ], + "packages-dev": [], + "aliases": [], + "minimum-stability": "stable", + "stability-flags": [], + "prefer-stable": false, + "platform": [], + "platform-dev": [] +} diff --git a/hphp/test/frameworks/results/slim.expect b/hphp/test/frameworks/results/slim.expect index 037b5c81694..eeca0d49063 100644 --- a/hphp/test/frameworks/results/slim.expect +++ b/hphp/test/frameworks/results/slim.expect @@ -127,15 +127,15 @@ MiddlewareTest::testSetApplication MiddlewareTest::testSetNextMiddleware . PrettyExceptionsTest::testExceptionTypeIsInResponseBody -. +R PrettyExceptionsTest::testResponseContentTypeIsOverriddenToHtml -. +R PrettyExceptionsTest::testReturnsDiagnosticsForErrorResponse -. +R PrettyExceptionsTest::testReturnsUnchangedSuccessResponse . PrettyExceptionsTest::testWithCustomLogWriter -. +R RequestTest::testAppPathsInRootDirectoryWithHtaccess . RequestTest::testAppPathsInRootDirectoryWithoutHtaccess @@ -571,7 +571,7 @@ SlimTest::testBatchSetSettings SlimTest::testContentType . SlimTest::testDefaultHandlerLogsTheErrorWhenDebugIsFalse -. +R SlimTest::testDefaultInstanceProperties . SlimTest::testDeleteCookie @@ -581,13 +581,13 @@ SlimTest::testDeleteRoute SlimTest::testDerivedClassCanOverrideStaticFunction . SlimTest::testETagWithInvalidType -. +R SlimTest::testErrorHandler . SlimTest::testErrorHandlerIfNotCallable . SlimTest::testErrorHandlerUsesCurrentResponseObject -. +R SlimTest::testErrorWithMultipleApps . SlimTest::testEtagDoesNotMatch @@ -653,7 +653,7 @@ SlimTest::testLastModifiedHeaderFormat SlimTest::testLastModifiedMatch . SlimTest::testLastModifiedOnlyAcceptsIntegers -. +R SlimTest::testModeConfiguration . SlimTest::testModeConfigurationWhenModeDoesNotMatch diff --git a/hphp/test/frameworks/run.php b/hphp/test/frameworks/run.php index 4ec07e46773..a01289bb661 100755 --- a/hphp/test/frameworks/run.php +++ b/hphp/test/frameworks/run.php @@ -190,8 +190,8 @@ function run_tests(Vector $frameworks): void { $framework->clean(); if (file_exists($framework->getExpectFile())) { $framework->prepareCurrentTestStatuses( - PHPUnitPatterns::$status_code_pattern, - PHPUnitPatterns::$stop_parsing_pattern); + PHPUnitPatterns::STATUS_CODE_PATTERN, + PHPUnitPatterns::STOP_PARSING_PATTERN); human(Colors::YELLOW.$framework->getName().Colors::NONE.": running. ". "Comparing against ".count($framework->getCurrentTestStatuses()). " tests\n"); -- 2.11.4.GIT