diff --git a/.travis.yml b/.travis.yml index a76ce9a..60c364f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -7,13 +7,14 @@ cache: - $HOME/.composer/cache/files php: - - 7.3 + - 7.4 env: - SUITE="curl" PACKAGE="php-http/curl-client:dev-master zendframework/zend-diactoros" - SUITE="Socket" PACKAGE="php-http/socket-client:dev-master php-http/client-common" - SUITE="Guzzle6" PACKAGE="php-http/guzzle6-adapter:dev-master" - SUITE="Guzzle" PACKAGE="guzzlehttp/guzzle:dev-master" + - SUITE="Guzzle" PACKAGE="guzzlehttp/guzzle:dev-master phpunit/phpunit:^8.5.8" - SUITE="React" PACKAGE="php-http/react-adapter:dev-master" - SUITE="Buzz" PACKAGE="php-http/buzz-adapter:dev-master" - SUITE="CakePHP" PACKAGE="php-http/cakephp-adapter:dev-master" diff --git a/composer.json b/composer.json index bec4c4e..de79ea9 100644 --- a/composer.json +++ b/composer.json @@ -15,10 +15,10 @@ } ], "require": { - "php": "^7.1", - "phpunit/phpunit": "^7.0 || ^8.0", - "php-http/message": "^1.0", - "guzzlehttp/psr7": "^1.0", + "php": "^7.1 || ^8.0", + "phpunit/phpunit": "^7.5.20 || ^8.5.8 || ^9.3.11", + "php-http/message": "^1.0 || ^2.0", + "guzzlehttp/psr7": "^1.7", "th3n3rd/cartesian-product": "^0.3" }, "suggest": { diff --git a/src/FeatureTestListener.php b/src/FeatureTestListener.php deleted file mode 100644 index cf9e507..0000000 --- a/src/FeatureTestListener.php +++ /dev/null @@ -1,67 +0,0 @@ -extractFeature($test); - - if (empty($feature)) { - $feature = $test->getName(); - } else { - $feature = $feature[0]; - } - - echo sprintf('%-40.s : ', $feature); - } - - protected function doEndTest($test, $time) - { - if (!$this->lastTestFailed) { - echo $this->formatWithColor('fg-green', 'Supported')."\n"; - } else { - echo $this->formatWithColor('fg-red', 'Not supported')."\n"; - } - - $this->lastTestFailed = false; - } - - private function extractFeature($test) - { - $class = get_class($test); - $method = $test->getName(false); - $reflection = new \ReflectionMethod($class, $method); - - return $this->parseDocBlock($reflection->getDocComment(), '@feature'); - } - - private function parseDocBlock($doc_block, $tag) - { - $matches = []; - - if (empty($doc_block)) { - return $matches; - } - - $regex = "/{$tag} (.*)(\\r\\n|\\r|\\n)/U"; - preg_match_all($regex, $doc_block, $matches); - - if (empty($matches[1])) { - return []; - } - - $matches = $matches[1]; - - foreach ($matches as $ix => $match) { - $matches[$ix] = trim($match); - } - - return $matches; - } -} diff --git a/src/ResultPrinter.php b/src/ResultPrinter.php deleted file mode 100644 index 497f43f..0000000 --- a/src/ResultPrinter.php +++ /dev/null @@ -1,21 +0,0 @@ -doStartTest($test); - } - - public function endTest(Test $test, float $time): void - { - return $this->doEndTest($test, $time); - } -}