From 183718204dafcb673c55a20ffb4a2628ac1c197c Mon Sep 17 00:00:00 2001 From: "J. King" Date: Sat, 16 Dec 2017 20:03:04 -0500 Subject: [PATCH] Grouped slow tests; improves #113 --- tests/cases/Feed/TestFeed.php | 3 +- tests/cases/Feed/TestFeedFetching.php | 4 ++- tests/lib/User/CommonTests.php | 2 ++ tests/phpunit.xml | 8 ----- vendor-bin/phpunit/composer.json | 3 +- vendor-bin/phpunit/composer.lock | 50 +-------------------------- 6 files changed, 9 insertions(+), 61 deletions(-) diff --git a/tests/cases/Feed/TestFeed.php b/tests/cases/Feed/TestFeed.php index ada949b..23e89f9 100644 --- a/tests/cases/Feed/TestFeed.php +++ b/tests/cases/Feed/TestFeed.php @@ -11,7 +11,8 @@ use Phake; /** * @covers \JKingWeb\Arsse\Feed - * @covers \JKingWeb\Arsse\Feed\Exception */ + * @covers \JKingWeb\Arsse\Feed\Exception + * @group slow */ class TestFeed extends Test\AbstractTest { protected static $host = "http://localhost:8000/"; protected $base = ""; diff --git a/tests/cases/Feed/TestFeedFetching.php b/tests/cases/Feed/TestFeedFetching.php index fd1fc0d..e5de504 100644 --- a/tests/cases/Feed/TestFeedFetching.php +++ b/tests/cases/Feed/TestFeedFetching.php @@ -8,7 +8,9 @@ namespace JKingWeb\Arsse; use Phake; -/** @covers \JKingWeb\Arsse\Feed */ +/** + * @covers \JKingWeb\Arsse\Feed + * @group slow */ class TestFeedFetching extends Test\AbstractTest { protected static $host = "http://localhost:8000/"; protected $base = ""; diff --git a/tests/lib/User/CommonTests.php b/tests/lib/User/CommonTests.php index 6945522..81d5d48 100644 --- a/tests/lib/User/CommonTests.php +++ b/tests/lib/User/CommonTests.php @@ -80,6 +80,7 @@ trait CommonTests { Arsse::$user->remove(self::USER1); } + /** @group slow */ public function testAuthenticateAUser() { $_SERVER['PHP_AUTH_USER'] = self::USER1; $_SERVER['PHP_AUTH_PW'] = "secret"; @@ -91,6 +92,7 @@ trait CommonTests { $this->assertTrue(Arsse::$user->auth(self::USER2, "")); } + /** @group slow */ public function testChangeAPassword() { Arsse::$user->add(self::USER1, "secret"); $this->assertEquals("superman", Arsse::$user->passwordSet(self::USER1, "superman")); diff --git a/tests/phpunit.xml b/tests/phpunit.xml index 831555c..76d41e9 100644 --- a/tests/phpunit.xml +++ b/tests/phpunit.xml @@ -15,14 +15,6 @@ ../lib - - - - 1500 - 1000 - - - diff --git a/vendor-bin/phpunit/composer.json b/vendor-bin/phpunit/composer.json index ce40765..1d56423 100644 --- a/vendor-bin/phpunit/composer.json +++ b/vendor-bin/phpunit/composer.json @@ -3,7 +3,6 @@ "phpunit/phpunit": "^6.5", "phake/phake": "^3.0", "mikey179/vfsStream": "^1.6", - "webmozart/glob": "^4.1", - "johnkary/phpunit-speedtrap": "^2.0" + "webmozart/glob": "^4.1" } } diff --git a/vendor-bin/phpunit/composer.lock b/vendor-bin/phpunit/composer.lock index 3ad71e5..bb02864 100644 --- a/vendor-bin/phpunit/composer.lock +++ b/vendor-bin/phpunit/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": "518be4a4ebed104f739a80d5a8eef27b", + "content-hash": "2feb94beae7c769e2df081af57c89fed", "packages": [ { "name": "doctrine/instantiator", @@ -60,54 +60,6 @@ ], "time": "2015-06-14T21:17:01+00:00" }, - { - "name": "johnkary/phpunit-speedtrap", - "version": "v2.0.0", - "source": { - "type": "git", - "url": "https://github.com/johnkary/phpunit-speedtrap.git", - "reference": "a1e39e0e3d07e0faee4ef3f342229d68fab07b5f" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/johnkary/phpunit-speedtrap/zipball/a1e39e0e3d07e0faee4ef3f342229d68fab07b5f", - "reference": "a1e39e0e3d07e0faee4ef3f342229d68fab07b5f", - "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-12-06T15:14:00+00:00" - }, { "name": "mikey179/vfsStream", "version": "v1.6.5",