file-fetcher
|
Static Public Member Functions | |
static | any () |
static | never () |
static | atLeast (int $requiredInvocations) |
static | atLeastOnce () |
static | once () |
static | exactly (int $count) |
static | atMost (int $allowedInvocations) |
static | at (int $index) |
static | returnValue ($value) |
static | returnValueMap (array $valueMap) |
static | returnArgument (int $argumentIndex) |
static | returnCallback ($callback) |
static | returnSelf () |
static | throwException (\Throwable $exception) |
static | onConsecutiveCalls (... $args) |
static | setUpBeforeClass () |
static | tearDownAfterClass () |
![]() | |
static | assertArrayHasKey ($key, $array, string $message='') |
static | assertArraySubset ($subset, $array, bool $checkForObjectIdentity=false, string $message='') |
static | assertArrayNotHasKey ($key, $array, string $message='') |
static | assertContains ($needle, $haystack, string $message='', bool $ignoreCase=false, bool $checkForObjectIdentity=true, bool $checkForNonObjectIdentity=false) |
static | assertContainsEquals ($needle, iterable $haystack, string $message='') |
static | assertAttributeContains ($needle, string $haystackAttributeName, $haystackClassOrObject, string $message='', bool $ignoreCase=false, bool $checkForObjectIdentity=true, bool $checkForNonObjectIdentity=false) |
static | assertNotContains ($needle, $haystack, string $message='', bool $ignoreCase=false, bool $checkForObjectIdentity=true, bool $checkForNonObjectIdentity=false) |
static | assertNotContainsEquals ($needle, iterable $haystack, string $message='') |
static | assertAttributeNotContains ($needle, string $haystackAttributeName, $haystackClassOrObject, string $message='', bool $ignoreCase=false, bool $checkForObjectIdentity=true, bool $checkForNonObjectIdentity=false) |
static | assertContainsOnly (string $type, iterable $haystack, ?bool $isNativeType=null, string $message='') |
static | assertContainsOnlyInstancesOf (string $className, iterable $haystack, string $message='') |
static | assertAttributeContainsOnly (string $type, string $haystackAttributeName, $haystackClassOrObject, ?bool $isNativeType=null, string $message='') |
static | assertNotContainsOnly (string $type, iterable $haystack, ?bool $isNativeType=null, string $message='') |
static | assertAttributeNotContainsOnly (string $type, string $haystackAttributeName, $haystackClassOrObject, ?bool $isNativeType=null, string $message='') |
static | assertCount (int $expectedCount, $haystack, string $message='') |
static | assertAttributeCount (int $expectedCount, string $haystackAttributeName, $haystackClassOrObject, string $message='') |
static | assertNotCount (int $expectedCount, $haystack, string $message='') |
static | assertAttributeNotCount (int $expectedCount, string $haystackAttributeName, $haystackClassOrObject, string $message='') |
static | assertEquals ($expected, $actual, string $message='', float $delta=0.0, int $maxDepth=10, bool $canonicalize=false, bool $ignoreCase=false) |
static | assertEqualsCanonicalizing ($expected, $actual, string $message='') |
static | assertEqualsIgnoringCase ($expected, $actual, string $message='') |
static | assertEqualsWithDelta ($expected, $actual, float $delta, string $message='') |
static | assertAttributeEquals ($expected, string $actualAttributeName, $actualClassOrObject, string $message='', float $delta=0.0, int $maxDepth=10, bool $canonicalize=false, bool $ignoreCase=false) |
static | assertNotEquals ($expected, $actual, string $message='', $delta=0.0, $maxDepth=10, $canonicalize=false, $ignoreCase=false) |
static | assertNotEqualsCanonicalizing ($expected, $actual, string $message='') |
static | assertNotEqualsIgnoringCase ($expected, $actual, string $message='') |
static | assertNotEqualsWithDelta ($expected, $actual, float $delta, string $message='') |
static | assertAttributeNotEquals ($expected, string $actualAttributeName, $actualClassOrObject, string $message='', float $delta=0.0, int $maxDepth=10, bool $canonicalize=false, bool $ignoreCase=false) |
static | assertEmpty ($actual, string $message='') |
static | assertAttributeEmpty (string $haystackAttributeName, $haystackClassOrObject, string $message='') |
static | assertNotEmpty ($actual, string $message='') |
static | assertAttributeNotEmpty (string $haystackAttributeName, $haystackClassOrObject, string $message='') |
static | assertGreaterThan ($expected, $actual, string $message='') |
static | assertAttributeGreaterThan ($expected, string $actualAttributeName, $actualClassOrObject, string $message='') |
static | assertGreaterThanOrEqual ($expected, $actual, string $message='') |
static | assertAttributeGreaterThanOrEqual ($expected, string $actualAttributeName, $actualClassOrObject, string $message='') |
static | assertLessThan ($expected, $actual, string $message='') |
static | assertAttributeLessThan ($expected, string $actualAttributeName, $actualClassOrObject, string $message='') |
static | assertLessThanOrEqual ($expected, $actual, string $message='') |
static | assertAttributeLessThanOrEqual ($expected, string $actualAttributeName, $actualClassOrObject, string $message='') |
static | assertFileEquals (string $expected, string $actual, string $message='', bool $canonicalize=false, bool $ignoreCase=false) |
static | assertFileEqualsCanonicalizing (string $expected, string $actual, string $message='') |
static | assertFileEqualsIgnoringCase (string $expected, string $actual, string $message='') |
static | assertFileNotEquals (string $expected, string $actual, string $message='', bool $canonicalize=false, bool $ignoreCase=false) |
static | assertFileNotEqualsCanonicalizing (string $expected, string $actual, string $message='') |
static | assertFileNotEqualsIgnoringCase (string $expected, string $actual, string $message='') |
static | assertStringEqualsFile (string $expectedFile, string $actualString, string $message='', bool $canonicalize=false, bool $ignoreCase=false) |
static | assertStringEqualsFileCanonicalizing (string $expectedFile, string $actualString, string $message='') |
static | assertStringEqualsFileIgnoringCase (string $expectedFile, string $actualString, string $message='') |
static | assertStringNotEqualsFile (string $expectedFile, string $actualString, string $message='', bool $canonicalize=false, bool $ignoreCase=false) |
static | assertStringNotEqualsFileCanonicalizing (string $expectedFile, string $actualString, string $message='') |
static | assertStringNotEqualsFileIgnoringCase (string $expectedFile, string $actualString, string $message='') |
static | assertIsReadable (string $filename, string $message='') |
static | assertNotIsReadable (string $filename, string $message='') |
static | assertIsWritable (string $filename, string $message='') |
static | assertNotIsWritable (string $filename, string $message='') |
static | assertDirectoryExists (string $directory, string $message='') |
static | assertDirectoryNotExists (string $directory, string $message='') |
static | assertDirectoryIsReadable (string $directory, string $message='') |
static | assertDirectoryNotIsReadable (string $directory, string $message='') |
static | assertDirectoryIsWritable (string $directory, string $message='') |
static | assertDirectoryNotIsWritable (string $directory, string $message='') |
static | assertFileExists (string $filename, string $message='') |
static | assertFileNotExists (string $filename, string $message='') |
static | assertFileIsReadable (string $file, string $message='') |
static | assertFileNotIsReadable (string $file, string $message='') |
static | assertFileIsWritable (string $file, string $message='') |
static | assertFileNotIsWritable (string $file, string $message='') |
static | assertTrue ($condition, string $message='') |
static | assertNotTrue ($condition, string $message='') |
static | assertFalse ($condition, string $message='') |
static | assertNotFalse ($condition, string $message='') |
static | assertNull ($actual, string $message='') |
static | assertNotNull ($actual, string $message='') |
static | assertFinite ($actual, string $message='') |
static | assertInfinite ($actual, string $message='') |
static | assertNan ($actual, string $message='') |
static | assertClassHasAttribute (string $attributeName, string $className, string $message='') |
static | assertClassNotHasAttribute (string $attributeName, string $className, string $message='') |
static | assertClassHasStaticAttribute (string $attributeName, string $className, string $message='') |
static | assertClassNotHasStaticAttribute (string $attributeName, string $className, string $message='') |
static | assertObjectHasAttribute (string $attributeName, $object, string $message='') |
static | assertObjectNotHasAttribute (string $attributeName, $object, string $message='') |
static | assertSame ($expected, $actual, string $message='') |
static | assertAttributeSame ($expected, string $actualAttributeName, $actualClassOrObject, string $message='') |
static | assertNotSame ($expected, $actual, string $message='') |
static | assertAttributeNotSame ($expected, string $actualAttributeName, $actualClassOrObject, string $message='') |
static | assertInstanceOf (string $expected, $actual, string $message='') |
static | assertAttributeInstanceOf (string $expected, string $attributeName, $classOrObject, string $message='') |
static | assertNotInstanceOf (string $expected, $actual, string $message='') |
static | assertAttributeNotInstanceOf (string $expected, string $attributeName, $classOrObject, string $message='') |
static | assertInternalType (string $expected, $actual, string $message='') |
static | assertAttributeInternalType (string $expected, string $attributeName, $classOrObject, string $message='') |
static | assertIsArray ($actual, string $message='') |
static | assertIsBool ($actual, string $message='') |
static | assertIsFloat ($actual, string $message='') |
static | assertIsInt ($actual, string $message='') |
static | assertIsNumeric ($actual, string $message='') |
static | assertIsObject ($actual, string $message='') |
static | assertIsResource ($actual, string $message='') |
static | assertIsString ($actual, string $message='') |
static | assertIsScalar ($actual, string $message='') |
static | assertIsCallable ($actual, string $message='') |
static | assertIsIterable ($actual, string $message='') |
static | assertNotInternalType (string $expected, $actual, string $message='') |
static | assertIsNotArray ($actual, string $message='') |
static | assertIsNotBool ($actual, string $message='') |
static | assertIsNotFloat ($actual, string $message='') |
static | assertIsNotInt ($actual, string $message='') |
static | assertIsNotNumeric ($actual, string $message='') |
static | assertIsNotObject ($actual, string $message='') |
static | assertIsNotResource ($actual, string $message='') |
static | assertIsNotString ($actual, string $message='') |
static | assertIsNotScalar ($actual, string $message='') |
static | assertIsNotCallable ($actual, string $message='') |
static | assertIsNotIterable ($actual, string $message='') |
static | assertAttributeNotInternalType (string $expected, string $attributeName, $classOrObject, string $message='') |
static | assertRegExp (string $pattern, string $string, string $message='') |
static | assertNotRegExp (string $pattern, string $string, string $message='') |
static | assertSameSize ($expected, $actual, string $message='') |
static | assertNotSameSize ($expected, $actual, string $message='') |
static | assertStringMatchesFormat (string $format, string $string, string $message='') |
static | assertStringNotMatchesFormat (string $format, string $string, string $message='') |
static | assertStringMatchesFormatFile (string $formatFile, string $string, string $message='') |
static | assertStringNotMatchesFormatFile (string $formatFile, string $string, string $message='') |
static | assertStringStartsWith (string $prefix, string $string, string $message='') |
static | assertStringStartsNotWith ($prefix, $string, string $message='') |
static | assertStringContainsString (string $needle, string $haystack, string $message='') |
static | assertStringContainsStringIgnoringCase (string $needle, string $haystack, string $message='') |
static | assertStringNotContainsString (string $needle, string $haystack, string $message='') |
static | assertStringNotContainsStringIgnoringCase (string $needle, string $haystack, string $message='') |
static | assertStringEndsWith (string $suffix, string $string, string $message='') |
static | assertStringEndsNotWith (string $suffix, string $string, string $message='') |
static | assertXmlFileEqualsXmlFile (string $expectedFile, string $actualFile, string $message='') |
static | assertXmlFileNotEqualsXmlFile (string $expectedFile, string $actualFile, string $message='') |
static | assertXmlStringEqualsXmlFile (string $expectedFile, $actualXml, string $message='') |
static | assertXmlStringNotEqualsXmlFile (string $expectedFile, $actualXml, string $message='') |
static | assertXmlStringEqualsXmlString ($expectedXml, $actualXml, string $message='') |
static | assertXmlStringNotEqualsXmlString ($expectedXml, $actualXml, string $message='') |
static | assertEqualXMLStructure (DOMElement $expectedElement, DOMElement $actualElement, bool $checkAttributes=false, string $message='') |
static | assertThat ($value, Constraint $constraint, string $message='') |
static | assertJson (string $actualJson, string $message='') |
static | assertJsonStringEqualsJsonString (string $expectedJson, string $actualJson, string $message='') |
static | assertJsonStringNotEqualsJsonString ($expectedJson, $actualJson, string $message='') |
static | assertJsonStringEqualsJsonFile (string $expectedFile, string $actualJson, string $message='') |
static | assertJsonStringNotEqualsJsonFile (string $expectedFile, string $actualJson, string $message='') |
static | assertJsonFileEqualsJsonFile (string $expectedFile, string $actualFile, string $message='') |
static | assertJsonFileNotEqualsJsonFile (string $expectedFile, string $actualFile, string $message='') |
static | logicalAnd () |
static | logicalOr () |
static | logicalNot (Constraint $constraint) |
static | logicalXor () |
static | anything () |
static | isTrue () |
static | callback (callable $callback) |
static | isFalse () |
static | isJson () |
static | isNull () |
static | isFinite () |
static | isInfinite () |
static | isNan () |
static | attribute (Constraint $constraint, string $attributeName) |
static | contains ($value, bool $checkForObjectIdentity=true, bool $checkForNonObjectIdentity=false) |
static | containsEqual ($value) |
static | containsIdentical ($value) |
static | containsOnly (string $type) |
static | containsOnlyInstancesOf (string $className) |
static | arrayHasKey ($key) |
static | equalTo ($value, float $delta=0.0, int $maxDepth=10, bool $canonicalize=false, bool $ignoreCase=false) |
static | attributeEqualTo (string $attributeName, $value, float $delta=0.0, int $maxDepth=10, bool $canonicalize=false, bool $ignoreCase=false) |
static | isEmpty () |
static | isWritable () |
static | isReadable () |
static | directoryExists () |
static | fileExists () |
static | greaterThan ($value) |
static | greaterThanOrEqual ($value) |
static | classHasAttribute (string $attributeName) |
static | classHasStaticAttribute (string $attributeName) |
static | objectHasAttribute ($attributeName) |
static | identicalTo ($value) |
static | isInstanceOf (string $className) |
static | isType (string $type) |
static | lessThan ($value) |
static | lessThanOrEqual ($value) |
static | matchesRegularExpression (string $pattern) |
static | matches (string $string) |
static | stringStartsWith ($prefix) |
static | stringContains (string $string, bool $case=true) |
static | stringEndsWith (string $suffix) |
static | countOf (int $count) |
static | fail (string $message='') |
static | readAttribute ($classOrObject, string $attributeName) |
static | getStaticAttribute (string $className, string $attributeName) |
static | getObjectAttribute ($object, string $attributeName) |
static | markTestIncomplete (string $message='') |
static | markTestSkipped (string $message='') |
static | getCount () |
static | resetCount () |
Protected Member Functions | |
setUp () | |
tearDown () | |
runTest () | |
iniSet (string $varName, string $newValue) | |
setLocale (... $args) | |
createStub (string $originalClassName) | |
createMock ($originalClassName) | |
createConfiguredMock ($originalClassName, array $configuration) | |
createPartialMock ($originalClassName, array $methods) | |
createTestProxy (string $originalClassName, array $constructorArguments=[]) | |
getMockClass ($originalClassName, $methods=[], array $arguments=[], $mockClassName='', $callOriginalConstructor=false, $callOriginalClone=true, $callAutoload=true, $cloneArguments=false) | |
getMockForAbstractClass ($originalClassName, array $arguments=[], $mockClassName='', $callOriginalConstructor=true, $callOriginalClone=true, $callAutoload=true, $mockedMethods=[], $cloneArguments=false) | |
getMockFromWsdl ($wsdlFile, $originalClassName='', $mockClassName='', array $methods=[], $callOriginalConstructor=true, array $options=[]) | |
getMockForTrait ($traitName, array $arguments=[], $mockClassName='', $callOriginalConstructor=true, $callOriginalClone=true, $callAutoload=true, $mockedMethods=[], $cloneArguments=false) | |
getObjectForTrait ($traitName, array $arguments=[], $traitClassName='', $callOriginalConstructor=true, $callOriginalClone=true, $callAutoload=true) | |
prophesize ($classOrInterface=null) | |
createResult () | |
assertPreConditions () | |
assertPostConditions () | |
onNotSuccessfulTest (\Throwable $t) | |
Protected Attributes | |
$backupGlobals | |
$backupGlobalsBlacklist = [] | |
$backupStaticAttributes | |
$backupStaticAttributesBlacklist = [] | |
$runTestInSeparateProcess | |
$preserveGlobalState = true | |
PHPUnit\Framework\TestCase::__construct | ( | $name = null , |
|
array | $data = [] , |
||
$dataName = '' |
|||
) |
string | $name | |
string | $dataName |
PHPUnit\Framework\TestCase::addToAssertionCount | ( | int | $count | ) |
PHPUnit\Framework\TestCase::addWarning | ( | string | $warning | ) |
|
static |
Returns a matcher that matches when the method is executed zero or more times.
|
protected |
Performs assertions shared by all tests of a test case.
This method is called between test and tearDown().
Reimplemented in TemplateMethodsTest, ExceptionInAssertPreConditionsTest, ExceptionInSetUpTest, ExceptionInTearDownTest, ExceptionInTest, and ExceptionInAssertPostConditionsTest.
|
protected |
Performs assertions shared by all tests of a test case.
This method is called between setUp() and test.
Reimplemented in TemplateMethodsTest, ExceptionInSetUpTest, ExceptionInTearDownTest, ExceptionInTest, ExceptionInAssertPostConditionsTest, and ExceptionInAssertPreConditionsTest.
|
static |
Returns a matcher that matches when the method is executed at the given index.
|
static |
Returns a matcher that matches when the method is executed at least N times.
|
static |
Returns a matcher that matches when the method is executed at least once.
|
static |
Returns a matcher that matches when the method is executed at most N times.
PHPUnit\Framework\TestCase::count | ( | ) |
|
protected |
Returns a configured mock object for the specified class.
string | string[] | $originalClassName | @psalm-template RealInstanceType of object @psalm-param class-string<RealInstanceType>|string[] $originalClassName @psalm-return MockObject&RealInstanceType |
|
protected |
Returns a mock object for the specified class.
string | string[] | $originalClassName | @psalm-template RealInstanceType of object @psalm-param class-string<RealInstanceType>|string[] $originalClassName @psalm-return MockObject&RealInstanceType |
|
protected |
Returns a partial mock object for the specified class.
string | string[] | $originalClassName | |
string[] | $methods | @psalm-template RealInstanceType of object @psalm-param class-string<RealInstanceType>|string[] $originalClassName @psalm-return MockObject&RealInstanceType |
|
protected |
Creates a default TestResult object.
|
protected |
Makes configurable stub for the specified class.
@psalm-template RealInstanceType of object @psalm-param class-string<RealInstanceType> $originalClassName @psalm-return Stub&RealInstanceType
|
protected |
Returns a test proxy for the specified class.
@psalm-template RealInstanceType of object @psalm-param class-string<RealInstanceType> $originalClassName @psalm-return MockObject&RealInstanceType
PHPUnit\Framework\TestCase::dataDescription | ( | ) |
PHPUnit\Framework\TestCase::dataName | ( | ) |
PHPUnit\Framework\TestCase::doesNotPerformAssertions | ( | ) |
PHPUnit\Framework\TestCase::doubledTypes | ( | ) |
|
static |
Returns a matcher that matches when the method is executed exactly $count times.
PHPUnit\Framework\TestCase::expectDeprecation | ( | ) |
PHPUnit\Framework\TestCase::expectDeprecationMessage | ( | string | $message | ) |
PHPUnit\Framework\TestCase::expectDeprecationMessageMatches | ( | string | $regularExpression | ) |
PHPUnit\Framework\TestCase::expectError | ( | ) |
PHPUnit\Framework\TestCase::expectErrorMessage | ( | string | $message | ) |
PHPUnit\Framework\TestCase::expectErrorMessageMatches | ( | string | $regularExpression | ) |
PHPUnit\Framework\TestCase::expectException | ( | string | $exception | ) |
@psalm-param class-string<\Throwable> $exception
PHPUnit\Framework\TestCase::expectExceptionCode | ( | $code | ) |
int | string | $code |
PHPUnit\Framework\TestCase::expectExceptionMessage | ( | string | $message | ) |
PHPUnit\Framework\TestCase::expectExceptionMessageMatches | ( | string | $regularExpression | ) |
PHPUnit\Framework\TestCase::expectExceptionMessageRegExp | ( | string | $regularExpression | ) |
PHPUnit\Framework\TestCase::expectExceptionObject | ( | \Exception | $exception | ) |
Sets up an expectation for an exception to be raised by the code under test. Information for expected exception class, expected exception message, and expected exception code are retrieved from a given Exception object.
PHPUnit\Framework\TestCase::expectNotice | ( | ) |
PHPUnit\Framework\TestCase::expectNoticeMessage | ( | string | $message | ) |
PHPUnit\Framework\TestCase::expectNoticeMessageMatches | ( | string | $regularExpression | ) |
PHPUnit\Framework\TestCase::expectNotToPerformAssertions | ( | ) |
PHPUnit\Framework\TestCase::expectOutputRegex | ( | string | $expectedRegex | ) |
PHPUnit\Framework\TestCase::expectOutputString | ( | string | $expectedString | ) |
PHPUnit\Framework\TestCase::expectWarning | ( | ) |
PHPUnit\Framework\TestCase::expectWarningMessage | ( | string | $message | ) |
PHPUnit\Framework\TestCase::expectWarningMessageMatches | ( | string | $regularExpression | ) |
PHPUnit\Framework\TestCase::getActualOutput | ( | ) |
PHPUnit\Framework\TestCase::getActualOutputForAssertion | ( | ) |
PHPUnit\Framework\TestCase::getAnnotations | ( | ) |
PHPUnit\Framework\TestCase::getDataSetAsString | ( | bool | $includeData = true | ) |
PHPUnit\Framework\TestCase::getDependencies | ( | ) |
PHPUnit\Framework\TestCase::getDependencyInput | ( | ) |
PHPUnit\Framework\TestCase::getExpectedException | ( | ) |
PHPUnit\Framework\TestCase::getExpectedExceptionCode | ( | ) |
PHPUnit\Framework\TestCase::getExpectedExceptionMessage | ( | ) |
PHPUnit\Framework\TestCase::getExpectedExceptionMessageRegExp | ( | ) |
PHPUnit\Framework\TestCase::getGroups | ( | ) |
PHPUnit\Framework\TestCase::getMockBuilder | ( | $className | ) |
Returns a builder object to create mock objects using a fluent interface.
string | string[] | $className | @psalm-template RealInstanceType of object @psalm-param class-string<RealInstanceType>|string[] $className @psalm-return MockBuilder<RealInstanceType> |
|
protected |
Mocks the specified class and returns the name of the mocked class.
string | $originalClassName | |
array | $methods | |
string | $mockClassName | |
bool | $callOriginalConstructor | |
bool | $callOriginalClone | |
bool | $callAutoload | |
bool | $cloneArguments | @psalm-template RealInstanceType of object @psalm-param class-string<RealInstanceType>|string $originalClassName @psalm-return class-string<MockObject&RealInstanceType> |
|
protected |
Returns a mock object for the specified abstract class with all abstract methods of the class mocked. Concrete methods are not mocked by default. To mock concrete methods, use the 7th parameter ($mockedMethods).
string | $originalClassName | |
string | $mockClassName | |
bool | $callOriginalConstructor | |
bool | $callOriginalClone | |
bool | $callAutoload | |
array | $mockedMethods | |
bool | $cloneArguments | @psalm-template RealInstanceType of object @psalm-param class-string<RealInstanceType> $originalClassName @psalm-return MockObject&RealInstanceType |
|
protected |
Returns a mock object for the specified trait with all abstract methods of the trait mocked. Concrete methods to mock can be specified with the $mockedMethods
parameter.
string | $traitName | |
string | $mockClassName | |
bool | $callOriginalConstructor | |
bool | $callOriginalClone | |
bool | $callAutoload | |
array | $mockedMethods | |
bool | $cloneArguments |
|
protected |
Returns a mock object based on the given WSDL file.
string | $wsdlFile | |
string | $originalClassName | |
string | $mockClassName | |
bool | $callOriginalConstructor | |
array | $options | An array of options passed to SOAPClient::_construct |
@psalm-template RealInstanceType of object @psalm-param class-string<RealInstanceType>|string $originalClassName @psalm-return MockObject&RealInstanceType
PHPUnit\Framework\TestCase::getName | ( | bool | $withDataSet = true | ) |
PHPUnit\Framework\TestCase::getNumAssertions | ( | ) |
Returns the number of assertions performed by this test.
|
protected |
Returns an object for the specified trait.
string | $traitName | |
string | $traitClassName | |
bool | $callOriginalConstructor | |
bool | $callOriginalClone | |
bool | $callAutoload |
PHPUnit\Framework\TestCase::getProvidedData | ( | ) |
Gets the data set of a TestCase.
PHPUnit\Framework\TestCase::getResult | ( | ) |
PHPUnit\Framework\TestCase::getSize | ( | ) |
Returns the size of the test.
PHPUnit\Framework\TestCase::getStatus | ( | ) |
PHPUnit\Framework\TestCase::getStatusMessage | ( | ) |
PHPUnit\Framework\TestCase::getTestResultObject | ( | ) |
PHPUnit\Framework\TestCase::hasDependencies | ( | ) |
PHPUnit\Framework\TestCase::hasExpectationOnOutput | ( | ) |
PHPUnit\Framework\TestCase::hasFailed | ( | ) |
PHPUnit\Framework\TestCase::hasOutput | ( | ) |
PHPUnit\Framework\TestCase::hasSize | ( | ) |
|
protected |
This method is a wrapper for the ini_set() function that automatically resets the modified php.ini setting to its original value after the test is run.
Exception |
PHPUnit\Framework\TestCase::isInIsolation | ( | ) |
PHPUnit\Framework\TestCase::isLarge | ( | ) |
PHPUnit\Framework\TestCase::isMedium | ( | ) |
PHPUnit\Framework\TestCase::isSmall | ( | ) |
PHPUnit\Framework\TestCase::markAsRisky | ( | ) |
|
static |
Returns a matcher that matches when the method is never executed.
|
static |
Returns a matcher that matches when the method is executed exactly once.
|
static |
|
protected |
This method is called when a test method did not execute successfully.
|
protected |
null | string | $classOrInterface |
PHPUnit\Framework\TestCase::registerComparator | ( | Comparator | $comparator | ) |
PHPUnit\Framework\TestCase::registerMockObject | ( | MockObject | $mockObject | ) |
|
static |
|
static |
|
static |
Returns the current object.
This method is useful when mocking a fluent interface.
|
static |
|
static |
PHPUnit\Framework\TestCase::run | ( | TestResult | $result = null | ) |
Runs the test case and collects the results in a TestResult object. If no TestResult object is passed a new one will be created.
CodeCoverageException | |
UtilException | |
Implements PHPUnit\Framework\Test.
PHPUnit\Framework\TestCase::runBare | ( | ) |
|
protected |
Override to run the test and assert its state.
Reimplemented in PHPUnit\Framework\IncompleteTestCase, PHPUnit\Framework\SkippedTestCase, PHPUnit\Framework\WarningTestCase, WasRun, TestWarning, Failure, Success, TestIncomplete, TestRisky, TestSkipped, and TestError.
PHPUnit\Framework\TestCase::setBackupGlobals | ( | ?bool | $backupGlobals | ) |
PHPUnit\Framework\TestCase::setBackupStaticAttributes | ( | ?bool | $backupStaticAttributes | ) |
PHPUnit\Framework\TestCase::setBeStrictAboutChangesToGlobalState | ( | ?bool | $beStrictAboutChangesToGlobalState | ) |
PHPUnit\Framework\TestCase::setDependencies | ( | array | $dependencies | ) |
string[] | $dependencies |
PHPUnit\Framework\TestCase::setDependencyInput | ( | array | $dependencyInput | ) |
PHPUnit\Framework\TestCase::setGroups | ( | array | $groups | ) |
PHPUnit\Framework\TestCase::setInIsolation | ( | bool | $inIsolation | ) |
|
protected |
This method is a wrapper for the setlocale() function that automatically resets the locale to its original value after the test is run.
Exception |
PHPUnit\Framework\TestCase::setName | ( | string | $name | ) |
PHPUnit\Framework\TestCase::setOutputCallback | ( | callable | $callback | ) |
PHPUnit\Framework\TestCase::setPreserveGlobalState | ( | bool | $preserveGlobalState | ) |
PHPUnit\Framework\TestCase::setRegisterMockObjectsFromTestArgumentsRecursively | ( | bool | $flag | ) |
PHPUnit\Framework\TestCase::setResult | ( | $result | ) |
PHPUnit\Framework\TestCase::setRunClassInSeparateProcess | ( | bool | $runClassInSeparateProcess | ) |
PHPUnit\Framework\TestCase::setRunTestInSeparateProcess | ( | bool | $runTestInSeparateProcess | ) |
PHPUnit\Framework\TestCase::setTestResultObject | ( | TestResult | $result | ) |
|
protected |
This method is called before each test.
Reimplemented in PharIo\Manifest\ManifestTest, PHPUnit\Runner\PhptTestCaseTest, DoctrineTest\InstantiatorTest\InstantiatorTest, PharIo\Manifest\CopyrightInformationTest, SebastianBergmann\Diff\Output\StrictUnifiedDiffOutputBuilderIntegrationTest, PHPUnit\Runner\ResultCacheExtensionTest, PharIo\Manifest\ExtensionTest, GeneratorTest, SebastianBergmann\Diff\LongestCommonSubsequenceTest, SebastianBergmann\Diff\Output\UnifiedDiffOutputBuilderIntegrationTest, SebastianBergmann\Type\ObjectTypeTest, PharIo\Manifest\BundledComponentCollectionTest, PharIo\Manifest\RequirementCollectionTest, PHPUnit\SelfTest\Basic\SetUpBeforeClassTest, PharIo\Manifest\AuthorCollectionTest, PHPUnit\Util\TestDox\CliTestDoxPrinterTest, SebastianBergmann\Comparator\DateTimeComparatorTest, SebastianBergmann\Diff\DifferTest, SebastianBergmann\Type\CallableTypeTest, SebastianBergmann\Comparator\DOMNodeComparatorTest, SebastianBergmann\Comparator\ExceptionComparatorTest, SebastianBergmann\Comparator\SplObjectStorageComparatorTest, SebastianBergmann\Diff\ParserTest, SebastianBergmann\Type\IterableTypeTest, DeepCopyTest\TypeFilter\Spl\ArrayObjectFilterTest, SebastianBergmann\FileIterator\FactoryTest, PHPUnit\Framework\TestListenerTest, SebastianBergmann\Comparator\MockObjectComparatorTest, SebastianBergmann\Comparator\ObjectComparatorTest, SebastianBergmann\Comparator\TypeComparatorTest, SebastianBergmann\GlobalState\SnapshotTest, SebastianBergmann\ObjectReflector\ObjectReflectorTest, SebastianBergmann\Type\GenericObjectTypeTest, phpDocumentor\Reflection\DocBlock\ExampleFinderTest, PHPUnit\Util\ConfigurationTest, SebastianBergmann\Comparator\ArrayComparatorTest, SebastianBergmann\Comparator\DoubleComparatorTest, SebastianBergmann\Comparator\NumericComparatorTest, SebastianBergmann\Comparator\ResourceComparatorTest, SebastianBergmann\Comparator\ScalarComparatorTest, SebastianBergmann\GlobalState\BlacklistTest, PharIo\Manifest\BundledComponentTest, PharIo\Manifest\PhpVersionRequirementTest, SebastianBergmann\CodeCoverage\FilterTest, PHPUnit\SelfTest\Basic\SetUpTest, PHPUnit\Util\TestDox\CliTestDoxPrinterColorTest, SebastianBergmann\Diff\Utils\UnifiedDiffAssertTraitIntegrationTest, PharIo\Manifest\AuthorTest, PharIo\Manifest\LicenseTest, SebastianBergmann\ObjectEnumerator\EnumeratorTest, PharIo\Manifest\ApplicationTest, PharIo\Manifest\LibraryTest, SebastianBergmann\CodeCoverage\CodeCoverageTest, PHP_Token_ClassTest, PHP_Token_InterfaceTest, PHPUnit\Runner\DefaultTestResultCacheTest, PHPUnit\Util\TestDox\NamePrettifierTest, SebastianBergmann\CodeUnitReverseLookup\WizardTest, SebastianBergmann\Diff\ChunkTest, SebastianBergmann\Diff\LineTest, SebastianBergmann\Exporter\ExporterTest, SebastianBergmann\RecursionContext\ContextTest, ExceptionInAssertPostConditionsTest, ExceptionInAssertPreConditionsTest, ExceptionInSetUpTest, ExceptionInTearDownTest, ExceptionInTest, TemplateMethodsTest, PHPUnit\Util\PHP\AbstractPhpProcessTest, SebastianBergmann\Environment\ConsoleTest, SebastianBergmann\Environment\OperatingSystemTest, SebastianBergmann\Environment\RuntimeTest, SebastianBergmann\Type\NullTypeTest, SebastianBergmann\Type\UnknownTypeTest, PHPUnit\Framework\TestSuiteTest, PHP_Token_ClosureTest, PHP_Token_FunctionTest, PHP_Token_IncludeTest, PharIo\Manifest\ContainsElementTest, SebastianBergmann\CodeCoverage\Report\BuilderTest, BankAccountTest, BankAccountWithCustomExtensionTest, PharIo\Manifest\BundlesElementTest, PharIo\Manifest\CopyrightElementTest, PharIo\Manifest\PhpElementTest, PharIo\Manifest\RequiresElementTest, Issue1374Test, BankAccountTest, PharIo\Manifest\AuthorElementTest, PharIo\Manifest\ComponentElementTest, PharIo\Manifest\ExtElementTest, PharIo\Manifest\ExtensionElementTest, PharIo\Manifest\LicenseElementTest, and BankAccountTest.
|
static |
This method is called before the first test of this test class is run.
Reimplemented in BeforeClassWithOnlyDataProviderTest, PHPUnit\SelfTest\Basic\SetUpBeforeClassTest, PHPUnit\Framework\TestCaseTest, SeparateClassRunMethodInNewProcessTest, SebastianBergmann\GlobalState\RestorerTest, SebastianBergmann\CodeCoverage\TestCase, SebastianBergmann\CodeCoverage\Report\Html\HTMLTest, SebastianBergmann\CodeCoverage\Report\Xml\XmlTest, RequirementsClassBeforeClassHookTest, TestCaseWithExceptionInHook, ClonedDependencyTest, PHPUnit\Framework\FunctionsTest, TemplateMethodsTest, and Issue2145Test.
PHPUnit\Framework\TestCase::setUseErrorHandler | ( | bool | $useErrorHandler | ) |
|
protected |
This method is called after each test.
Reimplemented in FileFetcherTest\FileFetcherTest, PHPUnit\Runner\PhptTestCaseTest, SebastianBergmann\Diff\Output\StrictUnifiedDiffOutputBuilderIntegrationTest, SebastianBergmann\Diff\Output\UnifiedDiffOutputBuilderIntegrationTest, phpDocumentor\Reflection\DocBlock\StandardTagFactoryTest, SebastianBergmann\Diff\LongestCommonSubsequenceTest, phpDocumentor\Reflection\DocBlock\Tags\MethodTest, PHPUnit\Util\TestDox\CliTestDoxPrinterTest, phpDocumentor\Reflection\DocBlockFactoryTest, phpDocumentor\Reflection\DocBlock\Tags\ParamTest, phpDocumentor\Reflection\DocBlock\Tags\PropertyReadTest, phpDocumentor\Reflection\DocBlock\Tags\PropertyTest, phpDocumentor\Reflection\DocBlock\Tags\PropertyWriteTest, phpDocumentor\Reflection\DocBlock\Tags\VarTest, phpDocumentor\Reflection\DocBlock\Tags\SeeTest, phpDocumentor\Reflection\DocBlock\Tags\ReturnTest, phpDocumentor\Reflection\DocBlock\Tags\ThrowsTest, SebastianBergmann\Diff\Utils\UnifiedDiffAssertTraitIntegrationTest, phpDocumentor\Reflection\DocBlock\Tags\CoversTest, phpDocumentor\Reflection\DocBlock\Tags\UsesTest, phpDocumentor\Reflection\DocBlock\DescriptionFactoryTest, phpDocumentor\Reflection\DocBlock\Tags\Formatter\AlignFormatterTest, phpDocumentor\Reflection\DocBlockTest, PHPUnit\Util\TestDox\CliTestDoxPrinterColorTest, phpDocumentor\Reflection\InterpretingDocBlocksTest, phpDocumentor\Reflection\DocBlock\Tags\DeprecatedTest, phpDocumentor\Reflection\DocBlock\Tags\GenericTest, phpDocumentor\Reflection\DocBlock\Tags\LinkTest, phpDocumentor\Reflection\DocBlock\Tags\SinceTest, phpDocumentor\Reflection\DocBlock\Tags\SourceTest, phpDocumentor\Reflection\DocBlock\Tags\VersionTest, ExceptionInSetUpTest, PHPUnit\Util\TestDox\NamePrettifierTest, phpDocumentor\Reflection\UsingTagsTest, phpDocumentor\Reflection\DocBlock\DescriptionTest, phpDocumentor\Reflection\DocBlock\SerializerTest, phpDocumentor\Reflection\DocBlock\Tags\Formatter\PassthroughFormatterTest, ExceptionInAssertPostConditionsTest, ExceptionInAssertPreConditionsTest, ExceptionInTearDownTest, ExceptionInTest, TemplateMethodsTest, PHPUnit\Util\PHP\AbstractPhpProcessTest, phpDocumentor\Reflection\DocBlock\Tags\AuthorTest, phpDocumentor\Reflection\DocblocksWithAnnotationsTest, phpDocumentor\Reflection\ReconstitutingADocBlockTest, PHPUnit\Framework\TestSuiteTest, SebastianBergmann\CodeCoverage\Report\Html\HTMLTest, SebastianBergmann\CodeCoverage\Report\Xml\XmlTest, phpDocumentor\Reflection\DocBlock\ExampleFinderTest, Issue1374Test, ExceptionInTestDetectedInTeardown, and phpDocumentor\Reflection\PregSplitTest.
|
static |
This method is called after the last test of this test class is run.
Reimplemented in PHPUnit\Framework\TestCaseTest, SeparateClassRunMethodInNewProcessTest, PHPUnit\SelfTest\Basic\TearDownAfterClassTest, TemplateMethodsTest, and ExceptionInTearDownAfterClassTest.
|
static |
PHPUnit\Framework\TestCase::toString | ( | ) |
Returns a string representation of the test case.
Implements PHPUnit\Framework\SelfDescribing.
Reimplemented in PHPUnit\Framework\IncompleteTestCase, PHPUnit\Framework\SkippedTestCase, and PHPUnit\Framework\WarningTestCase.
PHPUnit\Framework\TestCase::usesDataProvider | ( | ) |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |