Commit 7710e197 authored by Simon Welsh's avatar Simon Welsh

Update HHI files to the current state of PHPUnit 5.4

Updates CHANGELOG to match.

See #12
parent bc060e43
Pipeline #106 passed with stage
in 3 seconds
# Changelog
## 5.4.0
* Updated to match PHPUnit 5.4
* Added:
+ `PHPUnit_Framework_TestCase::dataDescription`
+ `PHPUnit_Framework_TestCase::getGroups`
+ `PHPUnit_Framework_TestCase::hasSize`
+ `PHPUnit_Framework_TestCase::isLarge`
+ `PHPUnit_Framework_TestCase::isMedium`
+ `PHPUnit_Framework_TestCase::isSmall`
+ `PHPUnit_Framework_TestCase::setGroups`
+ `PHPUnit_Framework_TestCase::usesDataProvider`
+ `PHPUnit_Framework_TestCase::createMock`
+ `PHPUnit_Framework_TestCase::registerMockObject`
+ `PHPUnit_Framework_TestCase::setRegisterMockObjectsFromTestArgumentsRecursively`
+ `PHPUnit_Framework_TestResult::getTimeoutForLargeTests`
+ `PHPUnit_Framework_TestResult::setRegisterMockObjectsFromTestArgumentsRecursively`
* Deprecated:
+ `PHPUnit_Framework_TestCase::getMock`
+ `PHPUnit_Framework_TestCase::getMockWithoutInvokingTheOriginalConstructor`
## 5.3.0
* Updated to match PHPUnit 5.3
......
......@@ -22,6 +22,7 @@ abstract class PHPUnit_Framework_TestCase extends PHPUnit_Framework_Assert
public function addToAssertionCount(int $count): void;
protected function checkRequirements(): void;
protected function createResult(): PHPUnit_Framework_TestResult;
public function dataDescription(): string;
public function expectOutputRegex(?string $expectedRegex): void;
public function expectOutputString(?string $expectedString): void;
public function getActualOutput(): string;
......@@ -32,6 +33,7 @@ abstract class PHPUnit_Framework_TestCase extends PHPUnit_Framework_Assert
);
protected function getDataSetAsString(bool $includeData = true): string;
public function getExpectedException(): ?string;
public function getGroups(): array;
public function getName(bool $withDataSet = true): string;
public function getNumAssertions(): int;
public function getResult(): mixed;
......@@ -44,9 +46,13 @@ abstract class PHPUnit_Framework_TestCase extends PHPUnit_Framework_Assert
public function hasExpectationOnOutput(): bool;
public function hasFailed(): bool;
public function hasOutput(): bool;
public function hasSize(): bool;
public function hasPerformedExpectationsOnOutput(): bool;
protected function iniSet(string $varName, string $newValue): void;
public function isInIsolation(): bool;
public function isLarge(): bool;
public function isMedium(): bool;
public function isSmall(): bool;
public function run(
?PHPUnit_Framework_TestResult $result = null,
): PHPUnit_Framework_TestResult;
......@@ -60,7 +66,7 @@ abstract class PHPUnit_Framework_TestCase extends PHPUnit_Framework_Assert
public function setDependencyInput(
array<string, mixed> $dependencyInput,
): void;
public function setbeStrictAboutChangesToGlobalState(
public function setBeStrictAboutChangesToGlobalState(
bool $beStrictAboutChangeToGlobalState,
): void;
public function setExpectedException<T>(
......@@ -78,6 +84,7 @@ abstract class PHPUnit_Framework_TestCase extends PHPUnit_Framework_Assert
public function expectExceptionMessage(string $message): void;
public function expectExceptionMessageRegExp(string $messageRegExp): void;
protected function setExpectedExceptionFromAnnotation(): void;
public function setGroups(array $groups): void;
public function setInIsolation(bool $inIsolation): void;
protected function setLocale(int $category, string $locale, ...): void;
public function setName(string $name): void;
......@@ -94,6 +101,7 @@ abstract class PHPUnit_Framework_TestCase extends PHPUnit_Framework_Assert
): void;
public function setUseErrorHandler(bool $useErrorHandler): void;
protected function setUseErrorHandlerFromAnnotation(): void;
public function usesDataProvider(): bool;
// Lifecycle
protected function assertPostConditions(): void;
......@@ -106,7 +114,11 @@ abstract class PHPUnit_Framework_TestCase extends PHPUnit_Framework_Assert
public static function tearDownAfterClass(): void;
// Mock objects
public function getMock<T>(
protected function createMock<T>(
classname<T> $originalClassName,
) /*: PHPUnit_Framework_MockObject_MockObject*/;
<<__Deprecated('Use createMock() or getMockBuilder() instead')>>
protected function getMock<T>(
classname<T> $originalClassName,
?array $methods = array(),
array $arguments = array(),
......@@ -130,7 +142,7 @@ abstract class PHPUnit_Framework_TestCase extends PHPUnit_Framework_Assert
bool $callAutoload = true,
bool $cloneArguments = false,
): classname<Tm>;
public function getMockForAbstractClass<T>(
protected function getMockForAbstractClass<T>(
classname<T> $originalClassName,
array $arguments = array(),
string $mockClassName = '',
......@@ -140,7 +152,7 @@ abstract class PHPUnit_Framework_TestCase extends PHPUnit_Framework_Assert
?array $mockedMethods = array(),
bool $cloneArguments = false,
) /*: PHPUnit_Framework_MockObject_MockObject*/;
public function getMockForTrait<T>(
protected function getMockForTrait<T>(
classname<T> $traitName,
array $arguments = array(),
string $mockClassName = '',
......@@ -160,7 +172,8 @@ abstract class PHPUnit_Framework_TestCase extends PHPUnit_Framework_Assert
) /*: PHPUnit_Framework_MockObject_MockObject*/;
protected function getMockObjectGenerator(
) /*: PHPUnit_Framework_MockObject_Generator*/;
public function getMockWithoutInvokingTheOriginalConstructor<T>(
<<__Deprecated('Use createMock() instead')>>
protected function getMockWithoutInvokingTheOriginalConstructor<T>(
classname<T> $originalClassName,
) /*: PHPUnit_Framework_MockObject_MockObject */;
protected function getObjectForTrait<T>(
......@@ -172,7 +185,13 @@ abstract class PHPUnit_Framework_TestCase extends PHPUnit_Framework_Assert
bool $callAutoload = true,
bool $cloneArguments = false,
);
public function registerMockObject(
/*PHPUnit_Framework_MockObject_MockObject*/ $mockObject,
): void;
protected function verifyMockObjects(): void;
public function setRegisterMockObjectsFromTestArgumentsRecursively(
bool $flag,
): void;
// Matches
public static function any(
......
......@@ -19,7 +19,7 @@ class PHPUnit_Framework_TestResult implements Countable {
protected float $time = 0.0;
protected ?PHPUnit_Framework_TestSuite $topTestSuite;
protected /*?PHP_CodeCoverage*/ $codeCoverage;
protected /*?SebastianBergmann\CodeCoverage\CodeCoverage*/ $codeCoverage;
protected bool $convertErrorsToExceptions = true;
protected bool $stop = false;
......@@ -108,8 +108,11 @@ class PHPUnit_Framework_TestResult implements Countable {
public function shouldStop(): bool;
public function stop(): void;
public function getCodeCoverage() /*: ?PHP_CodeCoverage */;
public function setCodeCoverage(/*PHP_CodeCoverage */ $codeCoverage): void;
public function getCodeCoverage(
) /*: ?SebastianBergmann\CodeCoverage\CodeCoverage */;
public function setCodeCoverage(
/*SebastianBergmann\CodeCoverage\CodeCoverage */ $codeCoverage,
): void;
public function convertErrorsToExceptions(bool $flag): void;
public function getConvertErrorsToExceptions(): bool;
......@@ -145,8 +148,13 @@ class PHPUnit_Framework_TestResult implements Countable {
public function setTimeoutForSmallTests(int $timeout): void;
public function setTimeoutForMediumTests(int $timeout): void;
public function getTimeoutForLargeTests(): int;
public function setTimeoutForLargeTests(int $timeout): void;
public function setRegisterMockObjectsFromTestArgumentsRecursively(
bool $flag,
): void;
protected function getHierarchy<T>(
classname<T> $className,
bool $asRefelctionObjects = false,
......
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