Browse Source

Grouped slow tests; improves #113

microsub
J. King 6 years ago
parent
commit
183718204d
  1. 3
      tests/cases/Feed/TestFeed.php
  2. 4
      tests/cases/Feed/TestFeedFetching.php
  3. 2
      tests/lib/User/CommonTests.php
  4. 8
      tests/phpunit.xml
  5. 3
      vendor-bin/phpunit/composer.json
  6. 50
      vendor-bin/phpunit/composer.lock

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

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

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

8
tests/phpunit.xml

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

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

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

Loading…
Cancel
Save