1
1
Fork 0
mirror of https://code.mensbeam.com/MensBeam/Arsse.git synced 2024-12-22 21:22:40 +00:00

Grouped slow tests; improves #113

This commit is contained in:
J. King 2017-12-16 20:03:04 -05:00
parent dd7d6e44b9
commit 183718204d
6 changed files with 9 additions and 61 deletions

View file

@ -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 = "";

View file

@ -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 = "";

View file

@ -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"));

View file

@ -15,14 +15,6 @@
<directory suffix=".php">../lib</directory>
</whitelist>
</filter>
<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">

View file

@ -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"
}
}

View file

@ -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",