Skip to content

Commit

Permalink
Improve annotations
Browse files Browse the repository at this point in the history
  • Loading branch information
sebastianbergmann committed Jun 14, 2018
1 parent 8586eab commit 4ec7d4d
Showing 1 changed file with 24 additions and 20 deletions.
44 changes: 24 additions & 20 deletions src/Framework/TestCase.php
Expand Up @@ -418,7 +418,8 @@ protected function tearDown()/* The :void return type declaration that should be
/**
* Returns a string representation of the test case.
*
* @throws SebastianBergmann\RecursionContext\InvalidArgumentException
* @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
* @throws \ReflectionException
*/
public function toString(): string
{
Expand Down Expand Up @@ -457,7 +458,7 @@ public function getAnnotations(): array
}

/**
* @throws SebastianBergmann\RecursionContext\InvalidArgumentException
* @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
*/
public function getName(bool $withDataSet = true): ?string
{
Expand All @@ -471,7 +472,7 @@ public function getName(bool $withDataSet = true): ?string
/**
* Returns the size of the test.
*
* @throws SebastianBergmann\RecursionContext\InvalidArgumentException
* @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
*/
public function getSize(): int
{
Expand All @@ -482,31 +483,31 @@ public function getSize(): int
}

/**
* @throws SebastianBergmann\RecursionContext\InvalidArgumentException
* @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
*/
public function hasSize(): bool
{
return $this->getSize() !== \PHPUnit\Util\Test::UNKNOWN;
}

/**
* @throws SebastianBergmann\RecursionContext\InvalidArgumentException
* @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
*/
public function isSmall(): bool
{
return $this->getSize() === \PHPUnit\Util\Test::SMALL;
}

/**
* @throws SebastianBergmann\RecursionContext\InvalidArgumentException
* @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
*/
public function isMedium(): bool
{
return $this->getSize() === \PHPUnit\Util\Test::MEDIUM;
}

/**
* @throws SebastianBergmann\RecursionContext\InvalidArgumentException
* @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
*/
public function isLarge(): bool
{
Expand Down Expand Up @@ -656,12 +657,12 @@ public function hasFailed(): bool
*
* @throws CodeCoverageException
* @throws ReflectionException
* @throws SebastianBergmann\CodeCoverage\CoveredCodeNotExecutedException
* @throws SebastianBergmann\CodeCoverage\InvalidArgumentException
* @throws SebastianBergmann\CodeCoverage\MissingCoversAnnotationException
* @throws SebastianBergmann\CodeCoverage\RuntimeException
* @throws SebastianBergmann\CodeCoverage\UnintentionallyCoveredCodeException
* @throws SebastianBergmann\RecursionContext\InvalidArgumentException
* @throws \SebastianBergmann\CodeCoverage\CoveredCodeNotExecutedException
* @throws \SebastianBergmann\CodeCoverage\InvalidArgumentException
* @throws \SebastianBergmann\CodeCoverage\MissingCoversAnnotationException
* @throws \SebastianBergmann\CodeCoverage\RuntimeException
* @throws \SebastianBergmann\CodeCoverage\UnintentionallyCoveredCodeException
* @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
*/
public function run(TestResult $result = null): TestResult
{
Expand Down Expand Up @@ -806,6 +807,9 @@ public function run(TestResult $result = null): TestResult
return $result;
}

/**
* @throws \Throwable
*/
public function runBare(): void
{
$this->numAssertions = 0;
Expand Down Expand Up @@ -1123,7 +1127,7 @@ public function getDataSetAsString(bool $includeData = true): string
* @throws AssertionFailedError
* @throws Exception
* @throws ExpectationFailedException
* @throws SebastianBergmann\ObjectEnumerator\InvalidArgumentException
* @throws \SebastianBergmann\ObjectEnumerator\InvalidArgumentException
* @throws Throwable
*/
protected function runTest()
Expand Down Expand Up @@ -1832,7 +1836,7 @@ private function snapshotGlobalState(): void

/**
* @throws RiskyTestError
* @throws SebastianBergmann\RecursionContext\InvalidArgumentException
* @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
* @throws \InvalidArgumentException
*/
private function restoreGlobalState(): void
Expand Down Expand Up @@ -1912,7 +1916,7 @@ private function createGlobalStateSnapshot(bool $backupGlobals): Snapshot

/**
* @throws RiskyTestError
* @throws SebastianBergmann\RecursionContext\InvalidArgumentException
* @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
* @throws \InvalidArgumentException
*/
private function compareGlobalStateSnapshots(Snapshot $before, Snapshot $after): void
Expand Down Expand Up @@ -1972,7 +1976,7 @@ private function getProphet(): Prophet
}

/**
* @throws SebastianBergmann\ObjectEnumerator\InvalidArgumentException
* @throws \SebastianBergmann\ObjectEnumerator\InvalidArgumentException
*/
private function shouldInvocationMockerBeReset(MockObject $mock): bool
{
Expand All @@ -1998,9 +2002,9 @@ private function shouldInvocationMockerBeReset(MockObject $mock): bool
}

/**
* @throws SebastianBergmann\ObjectEnumerator\InvalidArgumentException
* @throws SebastianBergmann\ObjectReflector\InvalidArgumentException
* @throws SebastianBergmann\RecursionContext\InvalidArgumentException
* @throws \SebastianBergmann\ObjectEnumerator\InvalidArgumentException
* @throws \SebastianBergmann\ObjectReflector\InvalidArgumentException
* @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
*/
private function registerMockObjectsFromTestArguments(array $testArguments, array &$visited = []): void
{
Expand Down

0 comments on commit 4ec7d4d

Please sign in to comment.