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:
parent
dd7d6e44b9
commit
183718204d
6 changed files with 9 additions and 61 deletions
|
@ -11,7 +11,8 @@ use Phake;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @covers \JKingWeb\Arsse\Feed
|
* @covers \JKingWeb\Arsse\Feed
|
||||||
* @covers \JKingWeb\Arsse\Feed\Exception */
|
* @covers \JKingWeb\Arsse\Feed\Exception
|
||||||
|
* @group slow */
|
||||||
class TestFeed extends Test\AbstractTest {
|
class TestFeed extends Test\AbstractTest {
|
||||||
protected static $host = "http://localhost:8000/";
|
protected static $host = "http://localhost:8000/";
|
||||||
protected $base = "";
|
protected $base = "";
|
||||||
|
|
|
@ -8,7 +8,9 @@ namespace JKingWeb\Arsse;
|
||||||
|
|
||||||
use Phake;
|
use Phake;
|
||||||
|
|
||||||
/** @covers \JKingWeb\Arsse\Feed */
|
/**
|
||||||
|
* @covers \JKingWeb\Arsse\Feed
|
||||||
|
* @group slow */
|
||||||
class TestFeedFetching extends Test\AbstractTest {
|
class TestFeedFetching extends Test\AbstractTest {
|
||||||
protected static $host = "http://localhost:8000/";
|
protected static $host = "http://localhost:8000/";
|
||||||
protected $base = "";
|
protected $base = "";
|
||||||
|
|
|
@ -80,6 +80,7 @@ trait CommonTests {
|
||||||
Arsse::$user->remove(self::USER1);
|
Arsse::$user->remove(self::USER1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** @group slow */
|
||||||
public function testAuthenticateAUser() {
|
public function testAuthenticateAUser() {
|
||||||
$_SERVER['PHP_AUTH_USER'] = self::USER1;
|
$_SERVER['PHP_AUTH_USER'] = self::USER1;
|
||||||
$_SERVER['PHP_AUTH_PW'] = "secret";
|
$_SERVER['PHP_AUTH_PW'] = "secret";
|
||||||
|
@ -91,6 +92,7 @@ trait CommonTests {
|
||||||
$this->assertTrue(Arsse::$user->auth(self::USER2, ""));
|
$this->assertTrue(Arsse::$user->auth(self::USER2, ""));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** @group slow */
|
||||||
public function testChangeAPassword() {
|
public function testChangeAPassword() {
|
||||||
Arsse::$user->add(self::USER1, "secret");
|
Arsse::$user->add(self::USER1, "secret");
|
||||||
$this->assertEquals("superman", Arsse::$user->passwordSet(self::USER1, "superman"));
|
$this->assertEquals("superman", Arsse::$user->passwordSet(self::USER1, "superman"));
|
||||||
|
|
|
@ -15,14 +15,6 @@
|
||||||
<directory suffix=".php">../lib</directory>
|
<directory suffix=".php">../lib</directory>
|
||||||
</whitelist>
|
</whitelist>
|
||||||
</filter>
|
</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>
|
<testsuites>
|
||||||
<testsuite name="Exceptions">
|
<testsuite name="Exceptions">
|
||||||
|
|
|
@ -3,7 +3,6 @@
|
||||||
"phpunit/phpunit": "^6.5",
|
"phpunit/phpunit": "^6.5",
|
||||||
"phake/phake": "^3.0",
|
"phake/phake": "^3.0",
|
||||||
"mikey179/vfsStream": "^1.6",
|
"mikey179/vfsStream": "^1.6",
|
||||||
"webmozart/glob": "^4.1",
|
"webmozart/glob": "^4.1"
|
||||||
"johnkary/phpunit-speedtrap": "^2.0"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
50
vendor-bin/phpunit/composer.lock
generated
50
vendor-bin/phpunit/composer.lock
generated
|
@ -4,7 +4,7 @@
|
||||||
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file",
|
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file",
|
||||||
"This file is @generated automatically"
|
"This file is @generated automatically"
|
||||||
],
|
],
|
||||||
"content-hash": "518be4a4ebed104f739a80d5a8eef27b",
|
"content-hash": "2feb94beae7c769e2df081af57c89fed",
|
||||||
"packages": [
|
"packages": [
|
||||||
{
|
{
|
||||||
"name": "doctrine/instantiator",
|
"name": "doctrine/instantiator",
|
||||||
|
@ -60,54 +60,6 @@
|
||||||
],
|
],
|
||||||
"time": "2015-06-14T21:17:01+00:00"
|
"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",
|
"name": "mikey179/vfsStream",
|
||||||
"version": "v1.6.5",
|
"version": "v1.6.5",
|
||||||
|
|
Loading…
Reference in a new issue