file-fetcher
Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
PHPUnit\Framework\TestCase Class Reference
Inheritance diagram for PHPUnit\Framework\TestCase:
PHPUnit\Framework\Assert PHPUnit\Framework\SelfDescribing PHPUnit\Framework\Test AbstractIssue3881Test AbstractTest AssertionExampleTest BankAccountTest BankAccountTest BankAccountTest BankAccountWithCustomExtensionTest Bar BeforeAndAfterTest BeforeClassAndAfterClassTest BeforeClassWithOnlyDataProviderTest ChangeCurrentWorkingDirectoryTest ClonedDependencyTest ConsecutiveParametersTest ContractsTest\MemoryTest ContractsTest\Mock\IdGenerator\SequentialTest CoverageClassExtendedTest CoverageClassExtendedTest CoverageClassNothingTest CoverageClassTest CoverageClassTest CoverageClassWithoutAnnotationsTest CoverageCoversOverridesCoversNothingTest CoverageFunctionParenthesesTest CoverageFunctionParenthesesTest CoverageFunctionParenthesesWhitespaceTest CoverageFunctionParenthesesWhitespaceTest CoverageFunctionTest CoverageFunctionTest CoverageMethodNothingCoversMethod CoverageMethodNothingTest CoverageMethodOneLineAnnotationTest CoverageMethodOneLineAnnotationTest CoverageMethodParenthesesTest CoverageMethodParenthesesTest CoverageMethodParenthesesWhitespaceTest CoverageMethodParenthesesWhitespaceTest CoverageMethodTest CoverageMethodTest CoverageNamespacedFunctionTest CoverageNoneTest CoverageNoneTest CoverageNothingTest CoverageNotPrivateTest CoverageNotPrivateTest CoverageNotProtectedTest CoverageNotProtectedTest CoverageNotPublicTest CoverageNotPublicTest CoveragePrivateTest CoveragePrivateTest CoverageProtectedTest CoverageProtectedTest CoveragePublicTest CoveragePublicTest DataProviderDebugTest DataProviderDependencyTest DataproviderExecutionOrderTest DataProviderFilterTest DataProviderIncompleteTest DataProviderSkippedTest DataProviderTest DeepCopyTest\DeepCopyTest DeepCopyTest\Filter\Doctrine\DoctrineCollectionFilterTest DeepCopyTest\Filter\Doctrine\DoctrineEmptyCollectionFilterTest DeepCopyTest\Filter\Doctrine\DoctrineProxyFilterTest DeepCopyTest\Filter\KeepFilterTest DeepCopyTest\Filter\ReplaceFilterTest DeepCopyTest\Filter\SetNullFilterTest DeepCopyTest\Matcher\Doctrine\DoctrineProxyMatcherTest DeepCopyTest\Matcher\PropertyMatcherTest DeepCopyTest\Matcher\PropertyNameMatcherTest DeepCopyTest\Matcher\PropertyTypeMatcherTest DeepCopyTest\Reflection\ReflectionHelperTest DeepCopyTest\TypeFilter\Date\DateIntervalFilterTest DeepCopyTest\TypeFilter\ReplaceFilterTest DeepCopyTest\TypeFilter\ShallowCopyFilterTest DeepCopyTest\TypeFilter\Spl\ArrayObjectFilterTest DeepCopyTest\TypeFilter\Spl\SplDoublyLinkedListFilterTest DeepCopyTest\TypeMatcher\TypeMatcherTest DependencyFailureTest DependencySuccessTest DocBlock\Tags\ExampleTest DoctrineTest\InstantiatorTest\Exception\InvalidArgumentExceptionTest DoctrineTest\InstantiatorTest\Exception\UnexpectedValueExceptionTest DoctrineTest\InstantiatorTest\InstantiatorTest DoesNotPerformAssertionsButPerformingAssertionsTest DoNoAssertionTestCase DummyBarTest DummyFooTest DuplicateKeyDataProviderTest EmptyDataProviderTest EmptyTestCaseTest ExceptionInAssertPostConditionsTest ExceptionInAssertPreConditionsTest ExceptionInSetUpTest ExceptionInTearDownAfterClassTest ExceptionInTearDownTest ExceptionInTest ExceptionInTestDetectedInTeardown ExceptionStackTest ExceptionTest Failure FailureTest FatalTest FileFetcherTest\FileFetcherTest Foo\DataProviderIssue2833\FirstTest Foo\DataProviderIssue2833\SecondTest Foo\DataProviderIssue2859\TestWithDataProviderTest Foo\DataProviderIssue2922\FirstTest Foo\DataProviderIssue2922\SecondHelloWorldTest Foo_Bar_Issue684Test Framework\Constraint\LogicalXorTest GeneratorTest IncompleteTest InheritanceB IniTest InvocationMockerTest IsolationTest Issue1021Test Issue1149Test Issue1216Test Issue1265Test Issue1330Test Issue1335Test Issue1337Test Issue1348Test Issue1351Test Issue1374Test Issue1437Test Issue1468Test Issue1471Test Issue1472Test Issue1570Test Issue2085Test Issue2137Test Issue2145Test Issue2158Test Issue2366Test Issue2380Test Issue2382Test Issue2435Test Issue2725\BeforeAfterClassPidTest Issue2731Test Issue2811Test Issue2830Test Issue2972\Issue2972Test Issue3093Test Issue322Test Issue3739\Issue3739Test Issue3889Test Issue3889Test Issue3904Test Issue3983Test Issue433Test Issue445Test Issue498Test Issue503Test Issue578Test Issue581Test Issue74Test Issue765Test Issue797Test MockBuilderTest MockObjectTest ModifiedConstructorTestCase MultiDependencyTest MultipleDataProviderTest My\Space\ExceptionNamespaceTest NamespaceCoverageClassExtendedTest NamespaceCoverageClassExtendedTest NamespaceCoverageClassTest NamespaceCoverageClassTest NamespaceCoverageCoversClassPublicTest NamespaceCoverageCoversClassPublicTest NamespaceCoverageCoversClassTest NamespaceCoverageCoversClassTest NamespaceCoverageMethodTest NamespaceCoverageMethodTest NamespaceCoverageNotPrivateTest NamespaceCoverageNotPrivateTest NamespaceCoverageNotProtectedTest NamespaceCoverageNotProtectedTest NamespaceCoverageNotPublicTest NamespaceCoverageNotPublicTest NamespaceCoveragePrivateTest NamespaceCoveragePrivateTest NamespaceCoverageProtectedTest NamespaceCoverageProtectedTest NamespaceCoveragePublicTest NamespaceCoveragePublicTest NoArgTestCaseTest NoTestCases NotExistingCoveredElementTest NotExistingCoveredElementTest NothingTest NotPublicTestCase NotVoidTestCase NullTestResultCacheTest NumericGroupAnnotationTest OneTest OneTest OneTestCase OutputTestCase PharIo\Manifest\ApplicationNameTest PharIo\Manifest\ApplicationTest PharIo\Manifest\AuthorCollectionTest PharIo\Manifest\AuthorElementCollectionTest PharIo\Manifest\AuthorElementTest PharIo\Manifest\AuthorTest PharIo\Manifest\BundledComponentCollectionTest PharIo\Manifest\BundledComponentTest PharIo\Manifest\BundlesElementTest PharIo\Manifest\ComponentElementCollectionTest PharIo\Manifest\ComponentElementTest PharIo\Manifest\ContainsElementTest PharIo\Manifest\CopyrightElementTest PharIo\Manifest\CopyrightInformationTest PharIo\Manifest\EmailTest PharIo\Manifest\ExtElementCollectionTest PharIo\Manifest\ExtElementTest PharIo\Manifest\ExtensionElementTest PharIo\Manifest\ExtensionTest PharIo\Manifest\LibraryTest PharIo\Manifest\LicenseElementTest PharIo\Manifest\LicenseTest PharIo\Manifest\ManifestDocumentLoadingExceptionTest PharIo\Manifest\ManifestDocumentMapperTest PharIo\Manifest\ManifestDocumentTest PharIo\Manifest\ManifestLoaderTest PharIo\Manifest\ManifestSerializerTest PharIo\Manifest\ManifestTest PharIo\Manifest\PhpElementTest PharIo\Manifest\PhpExtensionRequirementTest PharIo\Manifest\PhpVersionRequirementTest PharIo\Manifest\RequirementCollectionTest PharIo\Manifest\RequiresElementTest PharIo\Manifest\UrlTest PharIo\Version\AbstractVersionConstraintTest PharIo\Version\AndVersionConstraintGroupTest PharIo\Version\AnyVersionConstraintTest PharIo\Version\ExactVersionConstraintTest PharIo\Version\GreaterThanOrEqualToVersionConstraintTest PharIo\Version\OrVersionConstraintGroupTest PharIo\Version\PreReleaseSuffixTest PharIo\Version\SpecificMajorAndMinorVersionConstraintTest PharIo\Version\SpecificMajorVersionConstraintTest PharIo\Version\VersionConstraintParserTest PharIo\Version\VersionTest PHP_Token_ClassTest PHP_Token_ClosureTest PHP_Token_FunctionTest PHP_Token_IncludeTest PHP_Token_InterfaceTest PHP_Token_NamespaceTest phpDocumentor\Reflection\CollectionResolverTest phpDocumentor\Reflection\DocBlock\DescriptionFactoryTest phpDocumentor\Reflection\DocBlock\DescriptionTest phpDocumentor\Reflection\DocBlock\ExampleFinderTest phpDocumentor\Reflection\DocBlock\SerializerTest phpDocumentor\Reflection\DocBlock\StandardTagFactoryTest phpDocumentor\Reflection\DocBlock\Tags\AuthorTest phpDocumentor\Reflection\DocBlock\Tags\CoversTest phpDocumentor\Reflection\DocBlock\Tags\DeprecatedTest phpDocumentor\Reflection\DocBlock\Tags\Formatter\AlignFormatterTest phpDocumentor\Reflection\DocBlock\Tags\Formatter\PassthroughFormatterTest phpDocumentor\Reflection\DocBlock\Tags\GenericTest phpDocumentor\Reflection\DocBlock\Tags\InvalidTagTest phpDocumentor\Reflection\DocBlock\Tags\LinkTest phpDocumentor\Reflection\DocBlock\Tags\MethodTest phpDocumentor\Reflection\DocBlock\Tags\ParamTest phpDocumentor\Reflection\DocBlock\Tags\PropertyReadTest phpDocumentor\Reflection\DocBlock\Tags\PropertyTest phpDocumentor\Reflection\DocBlock\Tags\PropertyWriteTest phpDocumentor\Reflection\DocBlock\Tags\ReturnTest phpDocumentor\Reflection\DocBlock\Tags\SeeTest phpDocumentor\Reflection\DocBlock\Tags\SinceTest phpDocumentor\Reflection\DocBlock\Tags\SourceTest phpDocumentor\Reflection\DocBlock\Tags\ThrowsTest phpDocumentor\Reflection\DocBlock\Tags\UsesTest phpDocumentor\Reflection\DocBlock\Tags\VarTest phpDocumentor\Reflection\DocBlock\Tags\VersionTest phpDocumentor\Reflection\DocBlockFactoryTest phpDocumentor\Reflection\DocblockSeeTagResolvingTest phpDocumentor\Reflection\DocblocksWithAnnotationsTest phpDocumentor\Reflection\DocBlockTest phpDocumentor\Reflection\Exception\PcreExceptionTest phpDocumentor\Reflection\FqsenResolverTest phpDocumentor\Reflection\FqsenTest phpDocumentor\Reflection\InterpretingDocBlocksTest phpDocumentor\Reflection\ModifyBackTraceSafeTest phpDocumentor\Reflection\PregSplitTest phpDocumentor\Reflection\PseudoTypes\FalseTest phpDocumentor\Reflection\PseudoTypes\TrueTest phpDocumentor\Reflection\ReconstitutingADocBlockTest phpDocumentor\Reflection\TypeResolverTest phpDocumentor\Reflection\Types\ArrayTest phpDocumentor\Reflection\Types\BooleanTest phpDocumentor\Reflection\Types\ClassStringTest phpDocumentor\Reflection\Types\CollectionTest phpDocumentor\Reflection\Types\CompoundTest phpDocumentor\Reflection\Types\ContextFactoryTest phpDocumentor\Reflection\Types\ContextTest phpDocumentor\Reflection\Types\IterableTest phpDocumentor\Reflection\Types\NullableTest phpDocumentor\Reflection\UsingTagsTest PHPUnit\Framework\AssertTest PHPUnit\Framework\Constraint\ConstraintTestCase PHPUnit\Framework\Constraint\ExceptionCodeTest PHPUnit\Framework\Constraint\ExceptionMessageRegExpTest PHPUnit\Framework\Constraint\ExceptionMessageTest PHPUnit\Framework\Constraint\ExceptionTest PHPUnit\Framework\Constraint\JsonMatchesErrorMessageProviderTest PHPUnit\Framework\Constraint\LogicalNotTest PHPUnit\Framework\ConstraintTest PHPUnit\Framework\ExceptionTest PHPUnit\Framework\ExceptionWrapperTest PHPUnit\Framework\FunctionsTest PHPUnit\Framework\IncompleteTestCase PHPUnit\Framework\IncompleteTestCaseTest PHPUnit\Framework\InvalidArgumentExceptionTest PHPUnit\Framework\MockObject\ConfigurableMethodsTest PHPUnit\Framework\MockObject\ConfigurableMethodTest PHPUnit\Framework\MockObject\InvocationHandlerTest PHPUnit\Framework\MockObject\MatcherTest PHPUnit\Framework\MockObject\MockClassTest PHPUnit\Framework\MockObject\MockMethodTest PHPUnit\Framework\MockObject\MockTraitTest PHPUnit\Framework\SkippedTestCase PHPUnit\Framework\SkippedTestCaseTest PHPUnit\Framework\TestBuilderTest PHPUnit\Framework\TestCaseTest PHPUnit\Framework\TestFailureTest PHPUnit\Framework\TestImplementorTest PHPUnit\Framework\TestListenerTest PHPUnit\Framework\TestSuiteIteratorTest PHPUnit\Framework\TestSuiteTest PHPUnit\Framework\WarningTestCase PHPUnit\Runner\DefaultTestResultCacheTest PHPUnit\Runner\Filter\NameFilterIteratorTest PHPUnit\Runner\PhptTestCaseTest PHPUnit\Runner\ResultCacheExtensionTest PHPUnit\Runner\TestSuiteSorterTest PHPUnit\SelfTest\Basic\SetUpBeforeClassTest PHPUnit\SelfTest\Basic\SetUpTest PHPUnit\SelfTest\Basic\StatusTest PHPUnit\SelfTest\Basic\TearDownAfterClassTest PHPUnit\StaticAnalysis\TestUsingMocks PHPUnit\Test\HookTest PHPUnit\TestFixture\ActualOutputTest PHPUnit\Util\Annotation\RegistryTest PHPUnit\Util\ColorTest PHPUnit\Util\ConfigurationGeneratorTest PHPUnit\Util\ConfigurationTest PHPUnit\Util\GetoptTest PHPUnit\Util\GlobalStateTest PHPUnit\Util\JsonTest PHPUnit\Util\PHP\AbstractPhpProcessTest PHPUnit\Util\RegularExpressionTest PHPUnit\Util\TestClassTest PHPUnit\Util\TestDox\CliTestDoxPrinterColorTest PHPUnit\Util\TestDox\CliTestDoxPrinterTest PHPUnit\Util\TestDox\NamePrettifierTest PHPUnit\Util\XDebugFilterScriptGeneratorTest PHPUnit\Util\XmlTest ProxyObjectTest RequirementsClassBeforeClassHookTest RequirementsTest RouterTest SebastianBergmann\CodeCoverage\TestCase SebastianBergmann\CodeCoverage\tests\Exception\UnintentionallyCoveredCodeExceptionTest SebastianBergmann\CodeUnitReverseLookup\WizardTest SebastianBergmann\Comparator\ArrayComparatorTest SebastianBergmann\Comparator\ComparisonFailureTest SebastianBergmann\Comparator\DateTimeComparatorTest SebastianBergmann\Comparator\DOMNodeComparatorTest SebastianBergmann\Comparator\DoubleComparatorTest SebastianBergmann\Comparator\ExceptionComparatorTest SebastianBergmann\Comparator\FactoryTest SebastianBergmann\Comparator\MockObjectComparatorTest SebastianBergmann\Comparator\NumericComparatorTest SebastianBergmann\Comparator\ObjectComparatorTest SebastianBergmann\Comparator\ResourceComparatorTest SebastianBergmann\Comparator\ScalarComparatorTest SebastianBergmann\Comparator\SplObjectStorageComparatorTest SebastianBergmann\Comparator\TypeComparatorTest SebastianBergmann\Diff\ChunkTest SebastianBergmann\Diff\ConfigurationExceptionTest SebastianBergmann\Diff\DifferTest SebastianBergmann\Diff\DiffTest SebastianBergmann\Diff\InvalidArgumentExceptionTest SebastianBergmann\Diff\LineTest SebastianBergmann\Diff\LongestCommonSubsequenceTest SebastianBergmann\Diff\Output\AbstractChunkOutputBuilderTest SebastianBergmann\Diff\Output\DiffOnlyOutputBuilderTest SebastianBergmann\Diff\Output\StrictUnifiedDiffOutputBuilderIntegrationTest SebastianBergmann\Diff\Output\StrictUnifiedDiffOutputBuilderTest SebastianBergmann\Diff\Output\UnifiedDiffOutputBuilderIntegrationTest SebastianBergmann\Diff\Output\UnifiedDiffOutputBuilderTest SebastianBergmann\Diff\ParserTest SebastianBergmann\Diff\Utils\UnifiedDiffAssertTraitIntegrationTest SebastianBergmann\Diff\Utils\UnifiedDiffAssertTraitTest SebastianBergmann\Environment\ConsoleTest SebastianBergmann\Environment\OperatingSystemTest SebastianBergmann\Environment\RuntimeTest SebastianBergmann\Exporter\ExporterTest SebastianBergmann\FileIterator\FactoryTest SebastianBergmann\GlobalState\BlacklistTest SebastianBergmann\GlobalState\CodeExporterTest SebastianBergmann\GlobalState\RestorerTest SebastianBergmann\GlobalState\SnapshotTest SebastianBergmann\ObjectEnumerator\EnumeratorTest SebastianBergmann\ObjectReflector\ObjectReflectorTest SebastianBergmann\RecursionContext\ContextTest SebastianBergmann\ResourceOperations\ResourceOperationsTest SebastianBergmann\Timer\TimerTest SebastianBergmann\Type\CallableTypeTest SebastianBergmann\Type\GenericObjectTypeTest SebastianBergmann\Type\IterableTypeTest SebastianBergmann\Type\NullTypeTest SebastianBergmann\Type\ObjectTypeTest SebastianBergmann\Type\SimpleTypeTest SebastianBergmann\Type\TypeNameTest SebastianBergmann\Type\TypeTest SebastianBergmann\Type\UnknownTypeTest SebastianBergmann\Type\VoidTypeTest SeparateClassRunMethodInNewProcessTest SeparateProcessesTest StackTest StopOnErrorTestSuite StopsOnWarningTest Success TemplateMethodsTest Test TestAutoreferenced TestCaseWithExceptionInHook TestDoxGroupTest TestError TestIncomplete TestResultCacheTest TestRisky TestSkipped TestWarning TestWithAnnotations TestWithDifferentDurations TestWithDifferentNames TestWithDifferentOutput TestWithDifferentSizes TestWithDifferentStatuses TestWithTest ThrowExceptionTestCase ThrowNoExceptionTestCase TwoTest WasRun

Public Member Functions

 __construct ($name=null, array $data=[], $dataName='')
 
 toString ()
 
 count ()
 
 getActualOutputForAssertion ()
 
 expectOutputRegex (string $expectedRegex)
 
 expectOutputString (string $expectedString)
 
 expectException (string $exception)
 
 expectExceptionCode ($code)
 
 expectExceptionMessage (string $message)
 
 expectExceptionMessageMatches (string $regularExpression)
 
 expectExceptionMessageRegExp (string $regularExpression)
 
 expectExceptionObject (\Exception $exception)
 
 expectNotToPerformAssertions ()
 
 expectDeprecation ()
 
 expectDeprecationMessage (string $message)
 
 expectDeprecationMessageMatches (string $regularExpression)
 
 expectNotice ()
 
 expectNoticeMessage (string $message)
 
 expectNoticeMessageMatches (string $regularExpression)
 
 expectWarning ()
 
 expectWarningMessage (string $message)
 
 expectWarningMessageMatches (string $regularExpression)
 
 expectError ()
 
 expectErrorMessage (string $message)
 
 expectErrorMessageMatches (string $regularExpression)
 
 getStatus ()
 
 markAsRisky ()
 
 getStatusMessage ()
 
 hasFailed ()
 
 run (TestResult $result=null)
 
 getMockBuilder ($className)
 
 registerComparator (Comparator $comparator)
 
 setUseErrorHandler (bool $useErrorHandler)
 
 doubledTypes ()
 
 getGroups ()
 
 setGroups (array $groups)
 
 getAnnotations ()
 
 getName (bool $withDataSet=true)
 
 getSize ()
 
 hasSize ()
 
 isSmall ()
 
 isMedium ()
 
 isLarge ()
 
 getActualOutput ()
 
 hasOutput ()
 
 doesNotPerformAssertions ()
 
 hasExpectationOnOutput ()
 
 getExpectedException ()
 
 getExpectedExceptionCode ()
 
 getExpectedExceptionMessage ()
 
 getExpectedExceptionMessageRegExp ()
 
 setRegisterMockObjectsFromTestArgumentsRecursively (bool $flag)
 
 runBare ()
 
 setName (string $name)
 
 setDependencies (array $dependencies)
 
 getDependencies ()
 
 hasDependencies ()
 
 setDependencyInput (array $dependencyInput)
 
 getDependencyInput ()
 
 setBeStrictAboutChangesToGlobalState (?bool $beStrictAboutChangesToGlobalState)
 
 setBackupGlobals (?bool $backupGlobals)
 
 setBackupStaticAttributes (?bool $backupStaticAttributes)
 
 setRunTestInSeparateProcess (bool $runTestInSeparateProcess)
 
 setRunClassInSeparateProcess (bool $runClassInSeparateProcess)
 
 setPreserveGlobalState (bool $preserveGlobalState)
 
 setInIsolation (bool $inIsolation)
 
 isInIsolation ()
 
 getResult ()
 
 setResult ($result)
 
 setOutputCallback (callable $callback)
 
 getTestResultObject ()
 
 setTestResultObject (TestResult $result)
 
 registerMockObject (MockObject $mockObject)
 
 addToAssertionCount (int $count)
 
 getNumAssertions ()
 
 usesDataProvider ()
 
 dataDescription ()
 
 dataName ()
 
 getDataSetAsString (bool $includeData=true)
 
 getProvidedData ()
 
 addWarning (string $warning)
 

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 Public Member Functions inherited from PHPUnit\Framework\Assert
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
 

Constructor & Destructor Documentation

◆ __construct()

PHPUnit\Framework\TestCase::__construct (   $name = null,
array  $data = [],
  $dataName = '' 
)
Parameters
string$name
string$dataName

Member Function Documentation

◆ addToAssertionCount()

PHPUnit\Framework\TestCase::addToAssertionCount ( int  $count)

◆ addWarning()

PHPUnit\Framework\TestCase::addWarning ( string  $warning)

◆ any()

static PHPUnit\Framework\TestCase::any ( )
static

Returns a matcher that matches when the method is executed zero or more times.

◆ assertPostConditions()

PHPUnit\Framework\TestCase::assertPostConditions ( )
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.

◆ assertPreConditions()

PHPUnit\Framework\TestCase::assertPreConditions ( )
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.

◆ at()

static PHPUnit\Framework\TestCase::at ( int  $index)
static

Returns a matcher that matches when the method is executed at the given index.

◆ atLeast()

static PHPUnit\Framework\TestCase::atLeast ( int  $requiredInvocations)
static

Returns a matcher that matches when the method is executed at least N times.

◆ atLeastOnce()

static PHPUnit\Framework\TestCase::atLeastOnce ( )
static

Returns a matcher that matches when the method is executed at least once.

◆ atMost()

static PHPUnit\Framework\TestCase::atMost ( int  $allowedInvocations)
static

Returns a matcher that matches when the method is executed at most N times.

◆ count()

PHPUnit\Framework\TestCase::count ( )

◆ createConfiguredMock()

PHPUnit\Framework\TestCase::createConfiguredMock (   $originalClassName,
array  $configuration 
)
protected

Returns a configured mock object for the specified class.

Parameters
string | string[]$originalClassName@psalm-template RealInstanceType of object @psalm-param class-string<RealInstanceType>|string[] $originalClassName @psalm-return MockObject&RealInstanceType

◆ createMock()

PHPUnit\Framework\TestCase::createMock (   $originalClassName)
protected

Returns a mock object for the specified class.

Parameters
string | string[]$originalClassName@psalm-template RealInstanceType of object @psalm-param class-string<RealInstanceType>|string[] $originalClassName @psalm-return MockObject&RealInstanceType

◆ createPartialMock()

PHPUnit\Framework\TestCase::createPartialMock (   $originalClassName,
array  $methods 
)
protected

Returns a partial mock object for the specified class.

Parameters
string | string[]$originalClassName
string[]$methods@psalm-template RealInstanceType of object @psalm-param class-string<RealInstanceType>|string[] $originalClassName @psalm-return MockObject&RealInstanceType

◆ createResult()

PHPUnit\Framework\TestCase::createResult ( )
protected

Creates a default TestResult object.

◆ createStub()

PHPUnit\Framework\TestCase::createStub ( string  $originalClassName)
protected

Makes configurable stub for the specified class.

@psalm-template RealInstanceType of object @psalm-param class-string<RealInstanceType> $originalClassName @psalm-return Stub&RealInstanceType

◆ createTestProxy()

PHPUnit\Framework\TestCase::createTestProxy ( string  $originalClassName,
array  $constructorArguments = [] 
)
protected

Returns a test proxy for the specified class.

@psalm-template RealInstanceType of object @psalm-param class-string<RealInstanceType> $originalClassName @psalm-return MockObject&RealInstanceType

◆ dataDescription()

PHPUnit\Framework\TestCase::dataDescription ( )

◆ dataName()

PHPUnit\Framework\TestCase::dataName ( )
Returns
int|string

◆ doesNotPerformAssertions()

PHPUnit\Framework\TestCase::doesNotPerformAssertions ( )

◆ doubledTypes()

PHPUnit\Framework\TestCase::doubledTypes ( )
Returns
string[]

◆ exactly()

static PHPUnit\Framework\TestCase::exactly ( int  $count)
static

Returns a matcher that matches when the method is executed exactly $count times.

◆ expectDeprecation()

PHPUnit\Framework\TestCase::expectDeprecation ( )

◆ expectDeprecationMessage()

PHPUnit\Framework\TestCase::expectDeprecationMessage ( string  $message)

◆ expectDeprecationMessageMatches()

PHPUnit\Framework\TestCase::expectDeprecationMessageMatches ( string  $regularExpression)

◆ expectError()

PHPUnit\Framework\TestCase::expectError ( )

◆ expectErrorMessage()

PHPUnit\Framework\TestCase::expectErrorMessage ( string  $message)

◆ expectErrorMessageMatches()

PHPUnit\Framework\TestCase::expectErrorMessageMatches ( string  $regularExpression)

◆ expectException()

PHPUnit\Framework\TestCase::expectException ( string  $exception)

@psalm-param class-string<\Throwable> $exception

◆ expectExceptionCode()

PHPUnit\Framework\TestCase::expectExceptionCode (   $code)
Parameters
int | string$code

◆ expectExceptionMessage()

PHPUnit\Framework\TestCase::expectExceptionMessage ( string  $message)

◆ expectExceptionMessageMatches()

PHPUnit\Framework\TestCase::expectExceptionMessageMatches ( string  $regularExpression)

◆ expectExceptionMessageRegExp()

PHPUnit\Framework\TestCase::expectExceptionMessageRegExp ( string  $regularExpression)

◆ expectExceptionObject()

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.

◆ expectNotice()

PHPUnit\Framework\TestCase::expectNotice ( )

◆ expectNoticeMessage()

PHPUnit\Framework\TestCase::expectNoticeMessage ( string  $message)

◆ expectNoticeMessageMatches()

PHPUnit\Framework\TestCase::expectNoticeMessageMatches ( string  $regularExpression)

◆ expectNotToPerformAssertions()

PHPUnit\Framework\TestCase::expectNotToPerformAssertions ( )

◆ expectOutputRegex()

PHPUnit\Framework\TestCase::expectOutputRegex ( string  $expectedRegex)

◆ expectOutputString()

PHPUnit\Framework\TestCase::expectOutputString ( string  $expectedString)

◆ expectWarning()

PHPUnit\Framework\TestCase::expectWarning ( )

◆ expectWarningMessage()

PHPUnit\Framework\TestCase::expectWarningMessage ( string  $message)

◆ expectWarningMessageMatches()

PHPUnit\Framework\TestCase::expectWarningMessageMatches ( string  $regularExpression)

◆ getActualOutput()

PHPUnit\Framework\TestCase::getActualOutput ( )

◆ getActualOutputForAssertion()

PHPUnit\Framework\TestCase::getActualOutputForAssertion ( )

◆ getAnnotations()

PHPUnit\Framework\TestCase::getAnnotations ( )

◆ getDataSetAsString()

PHPUnit\Framework\TestCase::getDataSetAsString ( bool  $includeData = true)

◆ getDependencies()

PHPUnit\Framework\TestCase::getDependencies ( )

◆ getDependencyInput()

PHPUnit\Framework\TestCase::getDependencyInput ( )

◆ getExpectedException()

PHPUnit\Framework\TestCase::getExpectedException ( )

◆ getExpectedExceptionCode()

PHPUnit\Framework\TestCase::getExpectedExceptionCode ( )
Returns
null|int|string

◆ getExpectedExceptionMessage()

PHPUnit\Framework\TestCase::getExpectedExceptionMessage ( )

◆ getExpectedExceptionMessageRegExp()

PHPUnit\Framework\TestCase::getExpectedExceptionMessageRegExp ( )

◆ getGroups()

PHPUnit\Framework\TestCase::getGroups ( )

◆ getMockBuilder()

PHPUnit\Framework\TestCase::getMockBuilder (   $className)

Returns a builder object to create mock objects using a fluent interface.

Parameters
string | string[]$className@psalm-template RealInstanceType of object @psalm-param class-string<RealInstanceType>|string[] $className @psalm-return MockBuilder<RealInstanceType>

◆ getMockClass()

PHPUnit\Framework\TestCase::getMockClass (   $originalClassName,
  $methods = [],
array  $arguments = [],
  $mockClassName = '',
  $callOriginalConstructor = false,
  $callOriginalClone = true,
  $callAutoload = true,
  $cloneArguments = false 
)
protected

Mocks the specified class and returns the name of the mocked class.

Parameters
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>

◆ getMockForAbstractClass()

PHPUnit\Framework\TestCase::getMockForAbstractClass (   $originalClassName,
array  $arguments = [],
  $mockClassName = '',
  $callOriginalConstructor = true,
  $callOriginalClone = true,
  $callAutoload = true,
  $mockedMethods = [],
  $cloneArguments = false 
)
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).

Parameters
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

◆ getMockForTrait()

PHPUnit\Framework\TestCase::getMockForTrait (   $traitName,
array  $arguments = [],
  $mockClassName = '',
  $callOriginalConstructor = true,
  $callOriginalClone = true,
  $callAutoload = true,
  $mockedMethods = [],
  $cloneArguments = false 
)
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.

Parameters
string$traitName
string$mockClassName
bool$callOriginalConstructor
bool$callOriginalClone
bool$callAutoload
array$mockedMethods
bool$cloneArguments

◆ getMockFromWsdl()

PHPUnit\Framework\TestCase::getMockFromWsdl (   $wsdlFile,
  $originalClassName = '',
  $mockClassName = '',
array  $methods = [],
  $callOriginalConstructor = true,
array  $options = [] 
)
protected

Returns a mock object based on the given WSDL file.

Parameters
string$wsdlFile
string$originalClassName
string$mockClassName
bool$callOriginalConstructor
array$optionsAn array of options passed to SOAPClient::_construct

@psalm-template RealInstanceType of object @psalm-param class-string<RealInstanceType>|string $originalClassName @psalm-return MockObject&RealInstanceType

◆ getName()

PHPUnit\Framework\TestCase::getName ( bool  $withDataSet = true)
Exceptions

◆ getNumAssertions()

PHPUnit\Framework\TestCase::getNumAssertions ( )

Returns the number of assertions performed by this test.

◆ getObjectForTrait()

PHPUnit\Framework\TestCase::getObjectForTrait (   $traitName,
array  $arguments = [],
  $traitClassName = '',
  $callOriginalConstructor = true,
  $callOriginalClone = true,
  $callAutoload = true 
)
protected

Returns an object for the specified trait.

Parameters
string$traitName
string$traitClassName
bool$callOriginalConstructor
bool$callOriginalClone
bool$callAutoload
Returns
object

◆ getProvidedData()

PHPUnit\Framework\TestCase::getProvidedData ( )

Gets the data set of a TestCase.

◆ getResult()

PHPUnit\Framework\TestCase::getResult ( )

◆ getSize()

PHPUnit\Framework\TestCase::getSize ( )

Returns the size of the test.

Exceptions

◆ getStatus()

PHPUnit\Framework\TestCase::getStatus ( )

◆ getStatusMessage()

PHPUnit\Framework\TestCase::getStatusMessage ( )

◆ getTestResultObject()

PHPUnit\Framework\TestCase::getTestResultObject ( )

◆ hasDependencies()

PHPUnit\Framework\TestCase::hasDependencies ( )

◆ hasExpectationOnOutput()

PHPUnit\Framework\TestCase::hasExpectationOnOutput ( )

◆ hasFailed()

PHPUnit\Framework\TestCase::hasFailed ( )

◆ hasOutput()

PHPUnit\Framework\TestCase::hasOutput ( )

◆ hasSize()

PHPUnit\Framework\TestCase::hasSize ( )
Exceptions

◆ iniSet()

PHPUnit\Framework\TestCase::iniSet ( string  $varName,
string  $newValue 
)
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.

Exceptions
Exception

◆ isInIsolation()

PHPUnit\Framework\TestCase::isInIsolation ( )

◆ isLarge()

PHPUnit\Framework\TestCase::isLarge ( )
Exceptions

◆ isMedium()

PHPUnit\Framework\TestCase::isMedium ( )
Exceptions

◆ isSmall()

PHPUnit\Framework\TestCase::isSmall ( )
Exceptions

◆ markAsRisky()

PHPUnit\Framework\TestCase::markAsRisky ( )

◆ never()

static PHPUnit\Framework\TestCase::never ( )
static

Returns a matcher that matches when the method is never executed.

◆ once()

static PHPUnit\Framework\TestCase::once ( )
static

Returns a matcher that matches when the method is executed exactly once.

◆ onConsecutiveCalls()

static PHPUnit\Framework\TestCase::onConsecutiveCalls (   $args)
static

◆ onNotSuccessfulTest()

PHPUnit\Framework\TestCase::onNotSuccessfulTest ( \Throwable  $t)
protected

This method is called when a test method did not execute successfully.

Exceptions

◆ prophesize()

PHPUnit\Framework\TestCase::prophesize (   $classOrInterface = null)
protected
Parameters
null | string$classOrInterface
Exceptions

◆ registerComparator()

PHPUnit\Framework\TestCase::registerComparator ( Comparator  $comparator)

◆ registerMockObject()

PHPUnit\Framework\TestCase::registerMockObject ( MockObject  $mockObject)

◆ returnArgument()

static PHPUnit\Framework\TestCase::returnArgument ( int  $argumentIndex)
static

◆ returnCallback()

static PHPUnit\Framework\TestCase::returnCallback (   $callback)
static

◆ returnSelf()

static PHPUnit\Framework\TestCase::returnSelf ( )
static

Returns the current object.

This method is useful when mocking a fluent interface.

◆ returnValue()

static PHPUnit\Framework\TestCase::returnValue (   $value)
static

◆ returnValueMap()

static PHPUnit\Framework\TestCase::returnValueMap ( array  $valueMap)
static

◆ run()

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.

Exceptions
CodeCoverageException
UtilException

Implements PHPUnit\Framework\Test.

◆ runBare()

PHPUnit\Framework\TestCase::runBare ( )
Exceptions

◆ runTest()

PHPUnit\Framework\TestCase::runTest ( )
protected

◆ setBackupGlobals()

PHPUnit\Framework\TestCase::setBackupGlobals ( ?bool  $backupGlobals)

◆ setBackupStaticAttributes()

PHPUnit\Framework\TestCase::setBackupStaticAttributes ( ?bool  $backupStaticAttributes)

◆ setBeStrictAboutChangesToGlobalState()

PHPUnit\Framework\TestCase::setBeStrictAboutChangesToGlobalState ( ?bool  $beStrictAboutChangesToGlobalState)

◆ setDependencies()

PHPUnit\Framework\TestCase::setDependencies ( array  $dependencies)
Parameters
string[]$dependencies

◆ setDependencyInput()

PHPUnit\Framework\TestCase::setDependencyInput ( array  $dependencyInput)

◆ setGroups()

PHPUnit\Framework\TestCase::setGroups ( array  $groups)

◆ setInIsolation()

PHPUnit\Framework\TestCase::setInIsolation ( bool  $inIsolation)

◆ setLocale()

PHPUnit\Framework\TestCase::setLocale (   $args)
protected

This method is a wrapper for the setlocale() function that automatically resets the locale to its original value after the test is run.

Exceptions
Exception

◆ setName()

PHPUnit\Framework\TestCase::setName ( string  $name)

◆ setOutputCallback()

PHPUnit\Framework\TestCase::setOutputCallback ( callable  $callback)

◆ setPreserveGlobalState()

PHPUnit\Framework\TestCase::setPreserveGlobalState ( bool  $preserveGlobalState)

◆ setRegisterMockObjectsFromTestArgumentsRecursively()

PHPUnit\Framework\TestCase::setRegisterMockObjectsFromTestArgumentsRecursively ( bool  $flag)

◆ setResult()

PHPUnit\Framework\TestCase::setResult (   $result)

◆ setRunClassInSeparateProcess()

PHPUnit\Framework\TestCase::setRunClassInSeparateProcess ( bool  $runClassInSeparateProcess)

◆ setRunTestInSeparateProcess()

PHPUnit\Framework\TestCase::setRunTestInSeparateProcess ( bool  $runTestInSeparateProcess)

◆ setTestResultObject()

PHPUnit\Framework\TestCase::setTestResultObject ( TestResult  $result)

◆ setUp()

PHPUnit\Framework\TestCase::setUp ( )
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.

◆ setUpBeforeClass()

static PHPUnit\Framework\TestCase::setUpBeforeClass ( )
static

◆ setUseErrorHandler()

PHPUnit\Framework\TestCase::setUseErrorHandler ( bool  $useErrorHandler)

◆ tearDown()

PHPUnit\Framework\TestCase::tearDown ( )
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.

◆ tearDownAfterClass()

static PHPUnit\Framework\TestCase::tearDownAfterClass ( )
static

◆ throwException()

static PHPUnit\Framework\TestCase::throwException ( \Throwable  $exception)
static

◆ toString()

PHPUnit\Framework\TestCase::toString ( )

Returns a string representation of the test case.

Exceptions

Implements PHPUnit\Framework\SelfDescribing.

Reimplemented in PHPUnit\Framework\IncompleteTestCase, PHPUnit\Framework\SkippedTestCase, and PHPUnit\Framework\WarningTestCase.

◆ usesDataProvider()

PHPUnit\Framework\TestCase::usesDataProvider ( )

Member Data Documentation

◆ $backupGlobals

PHPUnit\Framework\TestCase::$backupGlobals
protected

◆ $backupGlobalsBlacklist

PHPUnit\Framework\TestCase::$backupGlobalsBlacklist = []
protected

◆ $backupStaticAttributes

PHPUnit\Framework\TestCase::$backupStaticAttributes
protected

◆ $backupStaticAttributesBlacklist

PHPUnit\Framework\TestCase::$backupStaticAttributesBlacklist = []
protected

◆ $preserveGlobalState

PHPUnit\Framework\TestCase::$preserveGlobalState = true
protected

◆ $runTestInSeparateProcess

PHPUnit\Framework\TestCase::$runTestInSeparateProcess
protected

The documentation for this class was generated from the following file: