Commit 9400d813 authored by Simon Welsh's avatar Simon Welsh

Update HHI files for 5.1

One new class, couple of new methods.

Part of #6
parent c215785f
......@@ -3,6 +3,11 @@
abstract class PHPUnit_Framework_BaseTestListener
implements PHPUnit_Framework_TestListener {
public function addError(PHPUnit_Framework_Test $test, Exception $e, $time);
public function addWarning(
PHPUnit_Framework_Test $test,
PHPUnit_Framework_Warning $e,
$time,
);
public function addFailure(
PHPUnit_Framework_Test $test,
PHPUnit_Framework_AssertionFailedError $e,
......
......@@ -4,6 +4,11 @@
// actual implementation, so no bonus types :(
interface PHPUnit_Framework_TestListener {
public function addError(PHPUnit_Framework_Test $test, Exception $e, $time);
public function addWarning(
PHPUnit_Framework_Test $test,
PHPUnit_Framework_Warning $e,
$time,
);
public function addFailure(
PHPUnit_Framework_Test $test,
PHPUnit_Framework_AssertionFailedError $e,
......
......@@ -9,6 +9,7 @@ class PHPUnit_Framework_TestResult implements Countable {
protected array<PHPUnit_Framework_TestFailure> $error = [];
protected array<PHPUnit_Framework_TestFailure> $failures = [];
protected array<PHPUnit_Framework_TestFailure> $warnings = [];
protected array<PHPUnit_Framework_TestFailure> $notImplemented = [];
protected array<PHPUnit_Framework_TestFailure> $risky = [];
protected array<PHPUnit_Framework_TestFailure> $skipped = [];
......@@ -24,6 +25,7 @@ class PHPUnit_Framework_TestResult implements Countable {
protected bool $stop = false;
protected bool $stopOnError = false;
protected bool $stopOnFailure = false;
protected bool $stopOnWarning = false;
protected bool $beStrictAboutTestsThatDoNotTestAnything = false;
protected bool $beStrictAboutOutputDuringTests = false;
protected bool $beStrictAboutTodoAnnotatedTests = false;
......@@ -49,6 +51,11 @@ class PHPUnit_Framework_TestResult implements Countable {
Exception $e,
float $time,
): void;
public function addWarning(
PHPUnit_Framework_Test $test,
PHPUnit_Framework_Warning $e,
$time,
): void;
public function addFailure(
PHPUnit_Framework_Test $test,
PHPUnit_Framework_AssertionFailedError $e,
......@@ -80,6 +87,9 @@ class PHPUnit_Framework_TestResult implements Countable {
public function failureCount(): int;
public function failures(): array<PHPUnit_Framework_TestFailure>;
public function warningCount(): int;
public function warnings(): array<PHPUnit_Framework_TestFailure>;
public function passed(
): array<string,
shape(
......@@ -106,6 +116,7 @@ class PHPUnit_Framework_TestResult implements Countable {
public function stopOnError(bool $flag): void;
public function stopOnFailure(bool $flag): void;
public function stopOnWarning(bool $flag);
public function beStrictAboutTestsThatDoNotTestAnything(bool $flag): void;
public function isStrictAboutTestsThatDoNotTestAnything(): bool;
......
<?hh // decl
class PHPUnit_Framework_Warning extends PHPUnit_Framework_TestCase {
protected bool $useErrorHandler = false;
public function __construct(protected string $message);
class PHPUnit_Framework_Warning extends PHPUnit_Framework_Exception
implements PHPUnit_Framework_SelfDescribing {
public function toString(): string;
}
<?hh // decl
class PHPUnit_Framework_WarningTestCase extends PHPUnit_Framework_TestCase {
protected bool $useErrorHandler = false;
public function __construct(protected string $message);
public function getMessage(): string;
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment