Copied!
Cloneable Instantiable
  • Extends
    PHPUnit\Framework\Assert
    PHPUnit\Framework\TestCase
  • Implements
    Countable
    PHPUnit\Framework\Reorderable
    PHPUnit\Framework\SelfDescribing
    PHPUnit\Framework\Test
    PHPUnit\Runner\Hook
Methods
public PHPUnit\Framework\TestCase :: __construct ( ? string $name = NULL , array $data = [ ] , $dataName = '' )
 
  • param int | string $dataName
  • internal This method is not covered by the backward compatibility promise for PHPUnit
public addSkipDirectory ( string $directory ) : self
 

Exclude any file with this $directory string in the path.

Only a simple stripos is used to match anything in the file name.

You can add multiple skips.

public addSkipNamespace ( string $namespace ) : self
 

Exclude namespace from namespace testing

You can add multiple namespaces to skip.

public PHPUnit\Framework\TestCase :: addToAssertionCount ( int $count ) : void
 
  • internal This method is not covered by the backward compatibility promise for PHPUnit
public PHPUnit\Framework\TestCase :: addWarning ( string $warning ) : void
 
  • internal This method is not covered by the backward compatibility promise for PHPUnit
public static PHPUnit\Framework\TestCase :: any () : PHPUnit\Framework\MockObject\Rule\AnyInvokedCount
 

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

public static PHPUnit\Framework\Assert :: anything () : PHPUnit\Framework\Constraint\IsAnything
public static PHPUnit\Framework\Assert :: arrayHasKey ( $key ) : PHPUnit\Framework\Constraint\ArrayHasKey
 
  • param int | string $key
public static PHPUnit\Framework\Assert :: assertArrayHasKey ( $key , $array , string $message = '' ) : void
 

Asserts that an array has a specified key.

  • param int | string $key
  • param array | ArrayAccess $array
  • throws SebastianBergmann\RecursionContext\InvalidArgumentException
  • throws PHPFUI\PHPUnitSyntaxCoverage\Exception
  • throws ExpectationFailedException
public static PHPUnit\Framework\Assert :: assertArrayNotHasKey ( $key , $array , string $message = '' ) : void
 

Asserts that an array does not have a specified key.

  • param int | string $key
  • param array | ArrayAccess $array
  • throws SebastianBergmann\RecursionContext\InvalidArgumentException
  • throws PHPFUI\PHPUnitSyntaxCoverage\Exception
  • throws ExpectationFailedException
public static PHPUnit\Framework\Assert :: assertClassHasAttribute ( string $attributeName , string $className , string $message = '' ) : void
 

Asserts that a class has a specified attribute.

public static PHPUnit\Framework\Assert :: assertClassHasStaticAttribute ( string $attributeName , string $className , string $message = '' ) : void
 

Asserts that a class has a specified static attribute.

public static PHPUnit\Framework\Assert :: assertClassNotHasAttribute ( string $attributeName , string $className , string $message = '' ) : void
 

Asserts that a class does not have a specified attribute.

public static PHPUnit\Framework\Assert :: assertClassNotHasStaticAttribute ( string $attributeName , string $className , string $message = '' ) : void
 

Asserts that a class does not have a specified static attribute.

public static PHPUnit\Framework\Assert :: assertContains ( $needle , iterable $haystack , string $message = '' ) : void
 

Asserts that a haystack contains a needle.

public static PHPUnit\Framework\Assert :: assertContainsEquals ( $needle , iterable $haystack , string $message = '' ) : void
public static PHPUnit\Framework\Assert :: assertContainsOnly ( string $type , iterable $haystack , ? bool $isNativeType = NULL , string $message = '' ) : void
 

Asserts that a haystack contains only values of a given type.

  • throws SebastianBergmann\RecursionContext\InvalidArgumentException
  • throws ExpectationFailedException
public static PHPUnit\Framework\Assert :: assertContainsOnlyInstancesOf ( string $className , iterable $haystack , string $message = '' ) : void
 

Asserts that a haystack contains only instances of a given class name.

  • throws SebastianBergmann\RecursionContext\InvalidArgumentException
  • throws ExpectationFailedException
public static PHPUnit\Framework\Assert :: assertCount ( int $expectedCount , $haystack , string $message = '' ) : void
 

Asserts the number of elements of an array, Countable or Traversable.

public static PHPUnit\Framework\Assert :: assertDirectoryDoesNotExist ( string $directory , string $message = '' ) : void
 

Asserts that a directory does not exist.

  • throws SebastianBergmann\RecursionContext\InvalidArgumentException
  • throws ExpectationFailedException
public static PHPUnit\Framework\Assert :: assertDirectoryExists ( string $directory , string $message = '' ) : void
 

Asserts that a directory exists.

  • throws SebastianBergmann\RecursionContext\InvalidArgumentException
  • throws ExpectationFailedException
public static PHPUnit\Framework\Assert :: assertDirectoryIsNotReadable ( string $directory , string $message = '' ) : void
 

Asserts that a directory exists and is not readable.

  • throws SebastianBergmann\RecursionContext\InvalidArgumentException
  • throws ExpectationFailedException
public static PHPUnit\Framework\Assert :: assertDirectoryIsNotWritable ( string $directory , string $message = '' ) : void
 

Asserts that a directory exists and is not writable.

  • throws SebastianBergmann\RecursionContext\InvalidArgumentException
  • throws ExpectationFailedException
public static PHPUnit\Framework\Assert :: assertDirectoryIsReadable ( string $directory , string $message = '' ) : void
 

Asserts that a directory exists and is readable.

  • throws SebastianBergmann\RecursionContext\InvalidArgumentException
  • throws ExpectationFailedException
public static PHPUnit\Framework\Assert :: assertDirectoryIsWritable ( string $directory , string $message = '' ) : void
 

Asserts that a directory exists and is writable.

  • throws SebastianBergmann\RecursionContext\InvalidArgumentException
  • throws ExpectationFailedException
public static PHPUnit\Framework\Assert :: assertDirectoryNotExists ( string $directory , string $message = '' ) : void
 

Asserts that a directory does not exist.

  • throws SebastianBergmann\RecursionContext\InvalidArgumentException
  • throws ExpectationFailedException
  • codeCoverageIgnore
  • deprecated https://github.com/sebastianbergmann/phpunit/issues/4068
public static PHPUnit\Framework\Assert :: assertDirectoryNotIsReadable ( string $directory , string $message = '' ) : void
 

Asserts that a directory exists and is not readable.

  • throws SebastianBergmann\RecursionContext\InvalidArgumentException
  • throws ExpectationFailedException
  • codeCoverageIgnore
  • deprecated https://github.com/sebastianbergmann/phpunit/issues/4071
public static PHPUnit\Framework\Assert :: assertDirectoryNotIsWritable ( string $directory , string $message = '' ) : void
 

Asserts that a directory exists and is not writable.

  • throws SebastianBergmann\RecursionContext\InvalidArgumentException
  • throws ExpectationFailedException
  • codeCoverageIgnore
  • deprecated https://github.com/sebastianbergmann/phpunit/issues/4074
public static PHPUnit\Framework\Assert :: assertDoesNotMatchRegularExpression ( string $pattern , string $string , string $message = '' ) : void
 

Asserts that a string does not match a given regular expression.

  • throws SebastianBergmann\RecursionContext\InvalidArgumentException
  • throws ExpectationFailedException
public static PHPUnit\Framework\Assert :: assertEmpty ( $actual , string $message = '' ) : void
 

Asserts that a variable is empty.

  • throws SebastianBergmann\RecursionContext\InvalidArgumentException
  • throws ExpectationFailedException
  • psalm-assert empty $actual
public static PHPUnit\Framework\Assert :: assertEquals ( $expected , $actual , string $message = '' ) : void
 

Asserts that two variables are equal.

  • throws SebastianBergmann\RecursionContext\InvalidArgumentException
  • throws ExpectationFailedException
public static PHPUnit\Framework\Assert :: assertEqualsCanonicalizing ( $expected , $actual , string $message = '' ) : void
 

Asserts that two variables are equal (canonicalizing).

  • throws SebastianBergmann\RecursionContext\InvalidArgumentException
  • throws ExpectationFailedException
public static PHPUnit\Framework\Assert :: assertEqualsIgnoringCase ( $expected , $actual , string $message = '' ) : void
 

Asserts that two variables are equal (ignoring case).

  • throws SebastianBergmann\RecursionContext\InvalidArgumentException
  • throws ExpectationFailedException
public static PHPUnit\Framework\Assert :: assertEqualsWithDelta ( $expected , $actual , float $delta , string $message = '' ) : void
 

Asserts that two variables are equal (with delta).

  • throws SebastianBergmann\RecursionContext\InvalidArgumentException
  • throws ExpectationFailedException
public static PHPUnit\Framework\Assert :: assertEqualXMLStructure ( DOMElement $expectedElement , DOMElement $actualElement , bool $checkAttributes = false , string $message = '' ) : void
 

Asserts that a hierarchy of DOMElements matches.

  • throws SebastianBergmann\RecursionContext\InvalidArgumentException
  • throws AssertionFailedError
  • throws ExpectationFailedException
  • codeCoverageIgnore
  • deprecated https://github.com/sebastianbergmann/phpunit/issues/4091
public static PHPUnit\Framework\Assert :: assertFalse ( $condition , string $message = '' ) : void
 

Asserts that a condition is false.

  • throws SebastianBergmann\RecursionContext\InvalidArgumentException
  • throws ExpectationFailedException
  • psalm-assert false $condition
public static PHPUnit\Framework\Assert :: assertFileDoesNotExist ( string $filename , string $message = '' ) : void
 

Asserts that a file does not exist.

  • throws SebastianBergmann\RecursionContext\InvalidArgumentException
  • throws ExpectationFailedException
public static PHPUnit\Framework\Assert :: assertFileEquals ( string $expected , string $actual , string $message = '' ) : void
 

Asserts that the contents of one file is equal to the contents of another
file.

  • throws SebastianBergmann\RecursionContext\InvalidArgumentException
  • throws ExpectationFailedException
public static PHPUnit\Framework\Assert :: assertFileEqualsCanonicalizing ( string $expected , string $actual , string $message = '' ) : void
 

Asserts that the contents of one file is equal to the contents of another
file (canonicalizing).

  • throws SebastianBergmann\RecursionContext\InvalidArgumentException
  • throws ExpectationFailedException
public static PHPUnit\Framework\Assert :: assertFileEqualsIgnoringCase ( string $expected , string $actual , string $message = '' ) : void
 

Asserts that the contents of one file is equal to the contents of another
file (ignoring case).

  • throws SebastianBergmann\RecursionContext\InvalidArgumentException
  • throws ExpectationFailedException
public static PHPUnit\Framework\Assert :: assertFileExists ( string $filename , string $message = '' ) : void
 

Asserts that a file exists.

  • throws SebastianBergmann\RecursionContext\InvalidArgumentException
  • throws ExpectationFailedException
public static PHPUnit\Framework\Assert :: assertFileIsNotReadable ( string $file , string $message = '' ) : void
 

Asserts that a file exists and is not readable.

  • throws SebastianBergmann\RecursionContext\InvalidArgumentException
  • throws ExpectationFailedException
public static PHPUnit\Framework\Assert :: assertFileIsNotWritable ( string $file , string $message = '' ) : void
 

Asserts that a file exists and is not writable.

  • throws SebastianBergmann\RecursionContext\InvalidArgumentException
  • throws ExpectationFailedException
public static PHPUnit\Framework\Assert :: assertFileIsReadable ( string $file , string $message = '' ) : void
 

Asserts that a file exists and is readable.

  • throws SebastianBergmann\RecursionContext\InvalidArgumentException
  • throws ExpectationFailedException
public static PHPUnit\Framework\Assert :: assertFileIsWritable ( string $file , string $message = '' ) : void
 

Asserts that a file exists and is writable.

  • throws SebastianBergmann\RecursionContext\InvalidArgumentException
  • throws ExpectationFailedException
public static PHPUnit\Framework\Assert :: assertFileNotEquals ( string $expected , string $actual , string $message = '' ) : void
 

Asserts that the contents of one file is not equal to the contents of
another file.

  • throws SebastianBergmann\RecursionContext\InvalidArgumentException
  • throws ExpectationFailedException
public static PHPUnit\Framework\Assert :: assertFileNotEqualsCanonicalizing ( string $expected , string $actual , string $message = '' ) : void
 

Asserts that the contents of one file is not equal to the contents of another
file (canonicalizing).

  • throws SebastianBergmann\RecursionContext\InvalidArgumentException
  • throws ExpectationFailedException
public static PHPUnit\Framework\Assert :: assertFileNotEqualsIgnoringCase ( string $expected , string $actual , string $message = '' ) : void
 

Asserts that the contents of one file is not equal to the contents of another
file (ignoring case).

  • throws SebastianBergmann\RecursionContext\InvalidArgumentException
  • throws ExpectationFailedException
public static PHPUnit\Framework\Assert :: assertFileNotExists ( string $filename , string $message = '' ) : void
 

Asserts that a file does not exist.

  • throws SebastianBergmann\RecursionContext\InvalidArgumentException
  • throws ExpectationFailedException
  • codeCoverageIgnore
  • deprecated https://github.com/sebastianbergmann/phpunit/issues/4077
public static PHPUnit\Framework\Assert :: assertFileNotIsReadable ( string $file , string $message = '' ) : void
 

Asserts that a file exists and is not readable.

  • throws SebastianBergmann\RecursionContext\InvalidArgumentException
  • throws ExpectationFailedException
  • codeCoverageIgnore
  • deprecated https://github.com/sebastianbergmann/phpunit/issues/4080
public static PHPUnit\Framework\Assert :: assertFileNotIsWritable ( string $file , string $message = '' ) : void
 

Asserts that a file exists and is not writable.

  • throws SebastianBergmann\RecursionContext\InvalidArgumentException
  • throws ExpectationFailedException
  • codeCoverageIgnore
  • deprecated https://github.com/sebastianbergmann/phpunit/issues/4083
public static PHPUnit\Framework\Assert :: assertFinite ( $actual , string $message = '' ) : void
 

Asserts that a variable is finite.

  • throws SebastianBergmann\RecursionContext\InvalidArgumentException
  • throws ExpectationFailedException
public static PHPUnit\Framework\Assert :: assertGreaterThan ( $expected , $actual , string $message = '' ) : void
 

Asserts that a value is greater than another value.

  • throws SebastianBergmann\RecursionContext\InvalidArgumentException
  • throws ExpectationFailedException
public static PHPUnit\Framework\Assert :: assertGreaterThanOrEqual ( $expected , $actual , string $message = '' ) : void
 

Asserts that a value is greater than or equal to another value.

  • throws SebastianBergmann\RecursionContext\InvalidArgumentException
  • throws ExpectationFailedException
public static PHPUnit\Framework\Assert :: assertInfinite ( $actual , string $message = '' ) : void
 

Asserts that a variable is infinite.

  • throws SebastianBergmann\RecursionContext\InvalidArgumentException
  • throws ExpectationFailedException
public static PHPUnit\Framework\Assert :: assertInstanceOf ( string $expected , $actual , string $message = '' ) : void
 

Asserts that a variable is of a given type.

  • throws SebastianBergmann\RecursionContext\InvalidArgumentException
  • throws PHPFUI\PHPUnitSyntaxCoverage\Exception
  • throws ExpectationFailedException
  • psalm-template ExpectedType of object
  • psalm-param class-string $expected
  • psalm-assert =ExpectedType $actual
public static PHPUnit\Framework\Assert :: assertIsArray ( $actual , string $message = '' ) : void
 

Asserts that a variable is of type array.

  • throws SebastianBergmann\RecursionContext\InvalidArgumentException
  • throws ExpectationFailedException
  • psalm-assert array $actual
public static PHPUnit\Framework\Assert :: assertIsBool ( $actual , string $message = '' ) : void
 

Asserts that a variable is of type bool.

  • throws SebastianBergmann\RecursionContext\InvalidArgumentException
  • throws ExpectationFailedException
  • psalm-assert bool $actual
public static PHPUnit\Framework\Assert :: assertIsCallable ( $actual , string $message = '' ) : void
 

Asserts that a variable is of type callable.

  • throws SebastianBergmann\RecursionContext\InvalidArgumentException
  • throws ExpectationFailedException
  • psalm-assert callable $actual
public static PHPUnit\Framework\Assert :: assertIsClosedResource ( $actual , string $message = '' ) : void
 

Asserts that a variable is of type resource and is closed.

  • throws SebastianBergmann\RecursionContext\InvalidArgumentException
  • throws ExpectationFailedException
  • psalm-assert resource $actual
public static PHPUnit\Framework\Assert :: assertIsFloat ( $actual , string $message = '' ) : void
 

Asserts that a variable is of type float.

  • throws SebastianBergmann\RecursionContext\InvalidArgumentException
  • throws ExpectationFailedException
  • psalm-assert float $actual
public static PHPUnit\Framework\Assert :: assertIsInt ( $actual , string $message = '' ) : void
 

Asserts that a variable is of type int.

  • throws SebastianBergmann\RecursionContext\InvalidArgumentException
  • throws ExpectationFailedException
  • psalm-assert int $actual
public static PHPUnit\Framework\Assert :: assertIsIterable ( $actual , string $message = '' ) : void
 

Asserts that a variable is of type iterable.

  • throws SebastianBergmann\RecursionContext\InvalidArgumentException
  • throws ExpectationFailedException
  • psalm-assert iterable $actual
public static PHPUnit\Framework\Assert :: assertIsNotArray ( $actual , string $message = '' ) : void
 

Asserts that a variable is not of type array.

  • throws SebastianBergmann\RecursionContext\InvalidArgumentException
  • throws ExpectationFailedException
  • psalm-assert !array $actual
public static PHPUnit\Framework\Assert :: assertIsNotBool ( $actual , string $message = '' ) : void
 

Asserts that a variable is not of type bool.

  • throws SebastianBergmann\RecursionContext\InvalidArgumentException
  • throws ExpectationFailedException
  • psalm-assert !bool $actual
public static PHPUnit\Framework\Assert :: assertIsNotCallable ( $actual , string $message = '' ) : void
 

Asserts that a variable is not of type callable.

  • throws SebastianBergmann\RecursionContext\InvalidArgumentException
  • throws ExpectationFailedException
  • psalm-assert !callable $actual
public static PHPUnit\Framework\Assert :: assertIsNotClosedResource ( $actual , string $message = '' ) : void
 

Asserts that a variable is not of type resource.

  • throws SebastianBergmann\RecursionContext\InvalidArgumentException
  • throws ExpectationFailedException
  • psalm-assert !resource $actual
public static PHPUnit\Framework\Assert :: assertIsNotFloat ( $actual , string $message = '' ) : void
 

Asserts that a variable is not of type float.

  • throws SebastianBergmann\RecursionContext\InvalidArgumentException
  • throws ExpectationFailedException
  • psalm-assert !float $actual
public static PHPUnit\Framework\Assert :: assertIsNotInt ( $actual , string $message = '' ) : void
 

Asserts that a variable is not of type int.

  • throws SebastianBergmann\RecursionContext\InvalidArgumentException
  • throws ExpectationFailedException
  • psalm-assert !int $actual
public static PHPUnit\Framework\Assert :: assertIsNotIterable ( $actual , string $message = '' ) : void
 

Asserts that a variable is not of type iterable.

  • throws SebastianBergmann\RecursionContext\InvalidArgumentException
  • throws ExpectationFailedException
  • psalm-assert !iterable $actual
public static PHPUnit\Framework\Assert :: assertIsNotNumeric ( $actual , string $message = '' ) : void
 

Asserts that a variable is not of type numeric.

  • throws SebastianBergmann\RecursionContext\InvalidArgumentException
  • throws ExpectationFailedException
  • psalm-assert !numeric $actual
public static PHPUnit\Framework\Assert :: assertIsNotObject ( $actual , string $message = '' ) : void
 

Asserts that a variable is not of type object.

  • throws SebastianBergmann\RecursionContext\InvalidArgumentException
  • throws ExpectationFailedException
  • psalm-assert !object $actual
public static PHPUnit\Framework\Assert :: assertIsNotReadable ( string $filename , string $message = '' ) : void
 

Asserts that a file/dir exists and is not readable.

  • throws SebastianBergmann\RecursionContext\InvalidArgumentException
  • throws ExpectationFailedException
public static PHPUnit\Framework\Assert :: assertIsNotResource ( $actual , string $message = '' ) : void
 

Asserts that a variable is not of type resource.

  • throws SebastianBergmann\RecursionContext\InvalidArgumentException
  • throws ExpectationFailedException
  • psalm-assert !resource $actual
public static PHPUnit\Framework\Assert :: assertIsNotScalar ( $actual , string $message = '' ) : void
 

Asserts that a variable is not of type scalar.

  • throws SebastianBergmann\RecursionContext\InvalidArgumentException
  • throws ExpectationFailedException
  • psalm-assert !scalar $actual
public static PHPUnit\Framework\Assert :: assertIsNotString ( $actual , string $message = '' ) : void
 

Asserts that a variable is not of type string.

  • throws SebastianBergmann\RecursionContext\InvalidArgumentException
  • throws ExpectationFailedException
  • psalm-assert !string $actual
public static PHPUnit\Framework\Assert :: assertIsNotWritable ( string $filename , string $message = '' ) : void
 

Asserts that a file/dir exists and is not writable.

  • throws SebastianBergmann\RecursionContext\InvalidArgumentException
  • throws ExpectationFailedException
public static PHPUnit\Framework\Assert :: assertIsNumeric ( $actual , string $message = '' ) : void
 

Asserts that a variable is of type numeric.

  • throws SebastianBergmann\RecursionContext\InvalidArgumentException
  • throws ExpectationFailedException
  • psalm-assert numeric $actual
public static PHPUnit\Framework\Assert :: assertIsObject ( $actual , string $message = '' ) : void
 

Asserts that a variable is of type object.

  • throws SebastianBergmann\RecursionContext\InvalidArgumentException
  • throws ExpectationFailedException
  • psalm-assert object $actual
public static PHPUnit\Framework\Assert :: assertIsReadable ( string $filename , string $message = '' ) : void
 

Asserts that a file/dir is readable.

  • throws SebastianBergmann\RecursionContext\InvalidArgumentException
  • throws ExpectationFailedException
public static PHPUnit\Framework\Assert :: assertIsResource ( $actual , string $message = '' ) : void
 

Asserts that a variable is of type resource.

  • throws SebastianBergmann\RecursionContext\InvalidArgumentException
  • throws ExpectationFailedException
  • psalm-assert resource $actual
public static PHPUnit\Framework\Assert :: assertIsScalar ( $actual , string $message = '' ) : void
 

Asserts that a variable is of type scalar.

  • throws SebastianBergmann\RecursionContext\InvalidArgumentException
  • throws ExpectationFailedException
  • psalm-assert scalar $actual
public static PHPUnit\Framework\Assert :: assertIsString ( $actual , string $message = '' ) : void
 

Asserts that a variable is of type string.

  • throws SebastianBergmann\RecursionContext\InvalidArgumentException
  • throws ExpectationFailedException
  • psalm-assert string $actual
public static PHPUnit\Framework\Assert :: assertIsWritable ( string $filename , string $message = '' ) : void
 

Asserts that a file/dir exists and is writable.

  • throws SebastianBergmann\RecursionContext\InvalidArgumentException
  • throws ExpectationFailedException
public static PHPUnit\Framework\Assert :: assertJson ( string $actualJson , string $message = '' ) : void
 

Asserts that a string is a valid JSON string.

  • throws SebastianBergmann\RecursionContext\InvalidArgumentException
  • throws ExpectationFailedException
public static PHPUnit\Framework\Assert :: assertJsonFileEqualsJsonFile ( string $expectedFile , string $actualFile , string $message = '' ) : void
 

Asserts that two JSON files are equal.

  • throws SebastianBergmann\RecursionContext\InvalidArgumentException
  • throws ExpectationFailedException
public static PHPUnit\Framework\Assert :: assertJsonFileNotEqualsJsonFile ( string $expectedFile , string $actualFile , string $message = '' ) : void
 

Asserts that two JSON files are not equal.

  • throws SebastianBergmann\RecursionContext\InvalidArgumentException
  • throws ExpectationFailedException
public static PHPUnit\Framework\Assert :: assertJsonStringEqualsJsonFile ( string $expectedFile , string $actualJson , string $message = '' ) : void
 

Asserts that the generated JSON encoded object and the content of the given file are equal.

  • throws SebastianBergmann\RecursionContext\InvalidArgumentException
  • throws ExpectationFailedException
public static PHPUnit\Framework\Assert :: assertJsonStringEqualsJsonString ( string $expectedJson , string $actualJson , string $message = '' ) : void
 

Asserts that two given JSON encoded objects or arrays are equal.

  • throws SebastianBergmann\RecursionContext\InvalidArgumentException
  • throws ExpectationFailedException
public static PHPUnit\Framework\Assert :: assertJsonStringNotEqualsJsonFile ( string $expectedFile , string $actualJson , string $message = '' ) : void
 

Asserts that the generated JSON encoded object and the content of the given file are not equal.

  • throws SebastianBergmann\RecursionContext\InvalidArgumentException
  • throws ExpectationFailedException
public static PHPUnit\Framework\Assert :: assertJsonStringNotEqualsJsonString ( $expectedJson , $actualJson , string $message = '' ) : void
 

Asserts that two given JSON encoded objects or arrays are not equal.

  • param string $expectedJson
  • param string $actualJson
  • throws SebastianBergmann\RecursionContext\InvalidArgumentException
  • throws ExpectationFailedException
public static PHPUnit\Framework\Assert :: assertLessThan ( $expected , $actual , string $message = '' ) : void
 

Asserts that a value is smaller than another value.

  • throws SebastianBergmann\RecursionContext\InvalidArgumentException
  • throws ExpectationFailedException
public static PHPUnit\Framework\Assert :: assertLessThanOrEqual ( $expected , $actual , string $message = '' ) : void
 

Asserts that a value is smaller than or equal to another value.

  • throws SebastianBergmann\RecursionContext\InvalidArgumentException
  • throws ExpectationFailedException
public static PHPUnit\Framework\Assert :: assertMatchesRegularExpression ( string $pattern , string $string , string $message = '' ) : void
 

Asserts that a string matches a given regular expression.

  • throws SebastianBergmann\RecursionContext\InvalidArgumentException
  • throws ExpectationFailedException
public static PHPUnit\Framework\Assert :: assertNan ( $actual , string $message = '' ) : void
 

Asserts that a variable is nan.

  • throws SebastianBergmann\RecursionContext\InvalidArgumentException
  • throws ExpectationFailedException
public static PHPUnit\Framework\Assert :: assertNotContains ( $needle , iterable $haystack , string $message = '' ) : void
 

Asserts that a haystack does not contain a needle.

public static PHPUnit\Framework\Assert :: assertNotContainsEquals ( $needle , iterable $haystack , string $message = '' ) : void
public static PHPUnit\Framework\Assert :: assertNotContainsOnly ( string $type , iterable $haystack , ? bool $isNativeType = NULL , string $message = '' ) : void
 

Asserts that a haystack does not contain only values of a given type.

  • throws SebastianBergmann\RecursionContext\InvalidArgumentException
  • throws ExpectationFailedException
public static PHPUnit\Framework\Assert :: assertNotCount ( int $expectedCount , $haystack , string $message = '' ) : void
 

Asserts the number of elements of an array, Countable or Traversable.

public static PHPUnit\Framework\Assert :: assertNotEmpty ( $actual , string $message = '' ) : void
 

Asserts that a variable is not empty.

  • throws SebastianBergmann\RecursionContext\InvalidArgumentException
  • throws ExpectationFailedException
  • psalm-assert !empty $actual
public static PHPUnit\Framework\Assert :: assertNotEquals ( $expected , $actual , string $message = '' ) : void
 

Asserts that two variables are not equal.

  • throws SebastianBergmann\RecursionContext\InvalidArgumentException
  • throws ExpectationFailedException
public static PHPUnit\Framework\Assert :: assertNotEqualsCanonicalizing ( $expected , $actual , string $message = '' ) : void
 

Asserts that two variables are not equal (canonicalizing).

  • throws SebastianBergmann\RecursionContext\InvalidArgumentException
  • throws ExpectationFailedException
public static PHPUnit\Framework\Assert :: assertNotEqualsIgnoringCase ( $expected , $actual , string $message = '' ) : void
 

Asserts that two variables are not equal (ignoring case).

  • throws SebastianBergmann\RecursionContext\InvalidArgumentException
  • throws ExpectationFailedException
public static PHPUnit\Framework\Assert :: assertNotEqualsWithDelta ( $expected , $actual , float $delta , string $message = '' ) : void
 

Asserts that two variables are not equal (with delta).

  • throws SebastianBergmann\RecursionContext\InvalidArgumentException
  • throws ExpectationFailedException
public static PHPUnit\Framework\Assert :: assertNotFalse ( $condition , string $message = '' ) : void
 

Asserts that a condition is not false.

  • throws SebastianBergmann\RecursionContext\InvalidArgumentException
  • throws ExpectationFailedException
  • psalm-assert !false $condition
public static PHPUnit\Framework\Assert :: assertNotInstanceOf ( string $expected , $actual , string $message = '' ) : void
 

Asserts that a variable is not of a given type.

  • throws SebastianBergmann\RecursionContext\InvalidArgumentException
  • throws PHPFUI\PHPUnitSyntaxCoverage\Exception
  • throws ExpectationFailedException
  • psalm-template ExpectedType of object
  • psalm-param class-string $expected
  • psalm-assert !ExpectedType $actual
public static PHPUnit\Framework\Assert :: assertNotIsReadable ( string $filename , string $message = '' ) : void
 

Asserts that a file/dir exists and is not readable.

  • throws SebastianBergmann\RecursionContext\InvalidArgumentException
  • throws ExpectationFailedException
  • codeCoverageIgnore
  • deprecated https://github.com/sebastianbergmann/phpunit/issues/4062
public static PHPUnit\Framework\Assert :: assertNotIsWritable ( string $filename , string $message = '' ) : void
 

Asserts that a file/dir exists and is not writable.

  • throws SebastianBergmann\RecursionContext\InvalidArgumentException
  • throws ExpectationFailedException
  • codeCoverageIgnore
  • deprecated https://github.com/sebastianbergmann/phpunit/issues/4065
public static PHPUnit\Framework\Assert :: assertNotNull ( $actual , string $message = '' ) : void
 

Asserts that a variable is not null.

  • throws SebastianBergmann\RecursionContext\InvalidArgumentException
  • throws ExpectationFailedException
  • psalm-assert !null $actual
public static PHPUnit\Framework\Assert :: assertNotRegExp ( string $pattern , string $string , string $message = '' ) : void
 

Asserts that a string does not match a given regular expression.

  • throws SebastianBergmann\RecursionContext\InvalidArgumentException
  • throws ExpectationFailedException
  • codeCoverageIgnore
  • deprecated https://github.com/sebastianbergmann/phpunit/issues/4089
public static PHPUnit\Framework\Assert :: assertNotSame ( $expected , $actual , string $message = '' ) : void
 

Asserts that two variables do not have the same type and value.

Used on objects, it asserts that two variables do not reference
the same object.

  • throws SebastianBergmann\RecursionContext\InvalidArgumentException
  • throws ExpectationFailedException
public static PHPUnit\Framework\Assert :: assertNotSameSize ( $expected , $actual , string $message = '' ) : void
 

Assert that the size of two arrays (or Countable or Traversable objects)
is not the same.

  • param Countable | iterable $expected
  • param Countable | iterable $actual
  • throws SebastianBergmann\RecursionContext\InvalidArgumentException
  • throws PHPFUI\PHPUnitSyntaxCoverage\Exception
  • throws ExpectationFailedException
public static PHPUnit\Framework\Assert :: assertNotTrue ( $condition , string $message = '' ) : void
 

Asserts that a condition is not true.

  • throws SebastianBergmann\RecursionContext\InvalidArgumentException
  • throws ExpectationFailedException
  • psalm-assert !true $condition
public static PHPUnit\Framework\Assert :: assertNull ( $actual , string $message = '' ) : void
 

Asserts that a variable is null.

  • throws SebastianBergmann\RecursionContext\InvalidArgumentException
  • throws ExpectationFailedException
  • psalm-assert null $actual
public static PHPUnit\Framework\Assert :: assertObjectEquals ( object $expected , object $actual , string $method = 'equals' , string $message = '' ) : void
 
  • throws ExpectationFailedException
public static PHPUnit\Framework\Assert :: assertObjectHasAttribute ( string $attributeName , $object , string $message = '' ) : void
 

Asserts that an object has a specified attribute.

public static PHPUnit\Framework\Assert :: assertObjectNotHasAttribute ( string $attributeName , $object , string $message = '' ) : void
 

Asserts that an object does not have a specified attribute.

public static PHPUnit\Framework\Assert :: assertRegExp ( string $pattern , string $string , string $message = '' ) : void
 

Asserts that a string matches a given regular expression.

  • throws SebastianBergmann\RecursionContext\InvalidArgumentException
  • throws ExpectationFailedException
  • codeCoverageIgnore
  • deprecated https://github.com/sebastianbergmann/phpunit/issues/4086
public static PHPUnit\Framework\Assert :: assertSame ( $expected , $actual , string $message = '' ) : void
 

Asserts that two variables have the same type and value.

Used on objects, it asserts that two variables reference
the same object.

  • throws SebastianBergmann\RecursionContext\InvalidArgumentException
  • throws ExpectationFailedException
  • psalm-template ExpectedType
  • psalm-param ExpectedType $expected
  • psalm-assert =ExpectedType $actual
public static PHPUnit\Framework\Assert :: assertSameSize ( $expected , $actual , string $message = '' ) : void
 

Assert that the size of two arrays (or Countable or Traversable objects)
is the same.

  • param Countable | iterable $expected
  • param Countable | iterable $actual
  • throws SebastianBergmann\RecursionContext\InvalidArgumentException
  • throws PHPFUI\PHPUnitSyntaxCoverage\Exception
  • throws ExpectationFailedException
public static PHPUnit\Framework\Assert :: assertStringContainsString ( string $needle , string $haystack , string $message = '' ) : void
 
  • throws SebastianBergmann\RecursionContext\InvalidArgumentException
  • throws ExpectationFailedException
public static PHPUnit\Framework\Assert :: assertStringContainsStringIgnoringCase ( string $needle , string $haystack , string $message = '' ) : void
 
  • throws SebastianBergmann\RecursionContext\InvalidArgumentException
  • throws ExpectationFailedException
public static PHPUnit\Framework\Assert :: assertStringEndsNotWith ( string $suffix , string $string , string $message = '' ) : void
 

Asserts that a string ends not with a given suffix.

  • throws SebastianBergmann\RecursionContext\InvalidArgumentException
  • throws ExpectationFailedException
public static PHPUnit\Framework\Assert :: assertStringEndsWith ( string $suffix , string $string , string $message = '' ) : void
 

Asserts that a string ends with a given suffix.

  • throws SebastianBergmann\RecursionContext\InvalidArgumentException
  • throws ExpectationFailedException
public static PHPUnit\Framework\Assert :: assertStringEqualsFile ( string $expectedFile , string $actualString , string $message = '' ) : void
 

Asserts that the contents of a string is equal
to the contents of a file.

  • throws SebastianBergmann\RecursionContext\InvalidArgumentException
  • throws ExpectationFailedException
public static PHPUnit\Framework\Assert :: assertStringEqualsFileCanonicalizing ( string $expectedFile , string $actualString , string $message = '' ) : void
 

Asserts that the contents of a string is equal
to the contents of a file (canonicalizing).

  • throws SebastianBergmann\RecursionContext\InvalidArgumentException
  • throws ExpectationFailedException
public static PHPUnit\Framework\Assert :: assertStringEqualsFileIgnoringCase ( string $expectedFile , string $actualString , string $message = '' ) : void
 

Asserts that the contents of a string is equal
to the contents of a file (ignoring case).

  • throws SebastianBergmann\RecursionContext\InvalidArgumentException
  • throws ExpectationFailedException
public static PHPUnit\Framework\Assert :: assertStringMatchesFormat ( string $format , string $string , string $message = '' ) : void
 

Asserts that a string matches a given format string.

  • throws SebastianBergmann\RecursionContext\InvalidArgumentException
  • throws ExpectationFailedException
public static PHPUnit\Framework\Assert :: assertStringMatchesFormatFile ( string $formatFile , string $string , string $message = '' ) : void
 

Asserts that a string matches a given format file.

  • throws SebastianBergmann\RecursionContext\InvalidArgumentException
  • throws ExpectationFailedException
public static PHPUnit\Framework\Assert :: assertStringNotContainsString ( string $needle , string $haystack , string $message = '' ) : void
 
  • throws SebastianBergmann\RecursionContext\InvalidArgumentException
  • throws ExpectationFailedException
public static PHPUnit\Framework\Assert :: assertStringNotContainsStringIgnoringCase ( string $needle , string $haystack , string $message = '' ) : void
 
  • throws SebastianBergmann\RecursionContext\InvalidArgumentException
  • throws ExpectationFailedException
public static PHPUnit\Framework\Assert :: assertStringNotEqualsFile ( string $expectedFile , string $actualString , string $message = '' ) : void
 

Asserts that the contents of a string is not equal
to the contents of a file.

  • throws SebastianBergmann\RecursionContext\InvalidArgumentException
  • throws ExpectationFailedException
public static PHPUnit\Framework\Assert :: assertStringNotEqualsFileCanonicalizing ( string $expectedFile , string $actualString , string $message = '' ) : void
 

Asserts that the contents of a string is not equal
to the contents of a file (canonicalizing).

  • throws SebastianBergmann\RecursionContext\InvalidArgumentException
  • throws ExpectationFailedException
public static PHPUnit\Framework\Assert :: assertStringNotEqualsFileIgnoringCase ( string $expectedFile , string $actualString , string $message = '' ) : void
 

Asserts that the contents of a string is not equal
to the contents of a file (ignoring case).

  • throws SebastianBergmann\RecursionContext\InvalidArgumentException
  • throws ExpectationFailedException
public static PHPUnit\Framework\Assert :: assertStringNotMatchesFormat ( string $format , string $string , string $message = '' ) : void
 

Asserts that a string does not match a given format string.

  • throws SebastianBergmann\RecursionContext\InvalidArgumentException
  • throws ExpectationFailedException
public static PHPUnit\Framework\Assert :: assertStringNotMatchesFormatFile ( string $formatFile , string $string , string $message = '' ) : void
 

Asserts that a string does not match a given format string.

  • throws SebastianBergmann\RecursionContext\InvalidArgumentException
  • throws ExpectationFailedException
public static PHPUnit\Framework\Assert :: assertStringStartsNotWith ( $prefix , $string , string $message = '' ) : void
 

Asserts that a string starts not with a given prefix.

  • param string $prefix
  • param string $string
  • throws SebastianBergmann\RecursionContext\InvalidArgumentException
  • throws ExpectationFailedException
public static PHPUnit\Framework\Assert :: assertStringStartsWith ( string $prefix , string $string , string $message = '' ) : void
 

Asserts that a string starts with a given prefix.

  • throws SebastianBergmann\RecursionContext\InvalidArgumentException
  • throws ExpectationFailedException
public static PHPUnit\Framework\Assert :: assertThat ( $value , PHPUnit\Framework\Constraint\Constraint $constraint , string $message = '' ) : void
 

Evaluates a PHPUnit\Framework\Constraint matcher object.

  • throws SebastianBergmann\RecursionContext\InvalidArgumentException
  • throws ExpectationFailedException
public static PHPUnit\Framework\Assert :: assertTrue ( $condition , string $message = '' ) : void
 

Asserts that a condition is true.

  • throws SebastianBergmann\RecursionContext\InvalidArgumentException
  • throws ExpectationFailedException
  • psalm-assert true $condition
public assertValidPHP ( string $code , string $message = '' ) : void
 

Assert a string containing valid PHP will parse.

Important: Any classes defined in this code will not be seen by the autoloader, as it only exists in this string.

public assertValidPHPDirectory ( string $directory , string $message = '' , bool $recurseSubdirectories = true , array $extensions = [ '.php' ] ) : void
 

Validate all files in a directory. Recursive and only looks at .php files by default.

public assertValidPHPFile ( string $fileName , string $message = '' ) : void
 

Test a specific file

public static PHPUnit\Framework\Assert :: assertXmlFileEqualsXmlFile ( string $expectedFile , string $actualFile , string $message = '' ) : void
 

Asserts that two XML files are equal.

public static PHPUnit\Framework\Assert :: assertXmlFileNotEqualsXmlFile ( string $expectedFile , string $actualFile , string $message = '' ) : void
 

Asserts that two XML files are not equal.

  • throws PHPUnit\Util\Exception
  • throws SebastianBergmann\RecursionContext\InvalidArgumentException
  • throws ExpectationFailedException
public static PHPUnit\Framework\Assert :: assertXmlStringEqualsXmlFile ( string $expectedFile , $actualXml , string $message = '' ) : void
 

Asserts that two XML documents are equal.

  • param DOMDocument | string $actualXml
  • throws PHPUnit\Util\Xml\Exception
  • throws SebastianBergmann\RecursionContext\InvalidArgumentException
  • throws ExpectationFailedException
public static PHPUnit\Framework\Assert :: assertXmlStringEqualsXmlString ( $expectedXml , $actualXml , string $message = '' ) : void
 

Asserts that two XML documents are equal.

  • param DOMDocument | string $expectedXml
  • param DOMDocument | string $actualXml
  • throws PHPUnit\Util\Xml\Exception
  • throws SebastianBergmann\RecursionContext\InvalidArgumentException
  • throws ExpectationFailedException
public static PHPUnit\Framework\Assert :: assertXmlStringNotEqualsXmlFile ( string $expectedFile , $actualXml , string $message = '' ) : void
 

Asserts that two XML documents are not equal.

  • param DOMDocument | string $actualXml
  • throws PHPUnit\Util\Xml\Exception
  • throws SebastianBergmann\RecursionContext\InvalidArgumentException
  • throws ExpectationFailedException
public static PHPUnit\Framework\Assert :: assertXmlStringNotEqualsXmlString ( $expectedXml , $actualXml , string $message = '' ) : void
 

Asserts that two XML documents are not equal.

  • param DOMDocument | string $expectedXml
  • param DOMDocument | string $actualXml
  • throws PHPUnit\Util\Xml\Exception
  • throws SebastianBergmann\RecursionContext\InvalidArgumentException
  • throws ExpectationFailedException
public static PHPUnit\Framework\TestCase :: at ( int $index ) : PHPUnit\Framework\MockObject\Rule\InvokedAtIndex
 

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

  • deprecated https://github.com/sebastianbergmann/phpunit/issues/4297
  • codeCoverageIgnore
public static PHPUnit\Framework\TestCase :: atLeast ( int $requiredInvocations ) : PHPUnit\Framework\MockObject\Rule\InvokedAtLeastCount
 

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

public static PHPUnit\Framework\TestCase :: atLeastOnce () : PHPUnit\Framework\MockObject\Rule\InvokedAtLeastOnce
 

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

public static PHPUnit\Framework\TestCase :: atMost ( int $allowedInvocations ) : PHPUnit\Framework\MockObject\Rule\InvokedAtMostCount
 

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

public static PHPUnit\Framework\Assert :: callback ( callable $callback ) : PHPUnit\Framework\Constraint\Callback
 
  • psalm-template CallbackInput of mixed
  • psalm-param callable(CallbackInput $callback): bool $callback
  • psalm-return Callback
public static PHPUnit\Framework\Assert :: classHasAttribute ( string $attributeName ) : PHPUnit\Framework\Constraint\ClassHasAttribute
public static PHPUnit\Framework\Assert :: classHasStaticAttribute ( string $attributeName ) : PHPUnit\Framework\Constraint\ClassHasStaticAttribute
public static PHPUnit\Framework\Assert :: containsEqual ( $value ) : PHPUnit\Framework\Constraint\TraversableContainsEqual
public static PHPUnit\Framework\Assert :: containsIdentical ( $value ) : PHPUnit\Framework\Constraint\TraversableContainsIdentical
public static PHPUnit\Framework\Assert :: containsOnly ( string $type ) : PHPUnit\Framework\Constraint\TraversableContainsOnly
public static PHPUnit\Framework\Assert :: containsOnlyInstancesOf ( string $className ) : PHPUnit\Framework\Constraint\TraversableContainsOnly
public PHPUnit\Framework\TestCase :: count () : int
public static PHPUnit\Framework\Assert :: countOf ( int $count ) : PHPUnit\Framework\Constraint\Count
public PHPUnit\Framework\TestCase :: dataName ()
 
  • return int | string
  • internal This method is not covered by the backward compatibility promise for PHPUnit
public static PHPUnit\Framework\Assert :: directoryExists () : PHPUnit\Framework\Constraint\DirectoryExists
public PHPUnit\Framework\TestCase :: doesNotPerformAssertions () : bool
 
  • internal This method is not covered by the backward compatibility promise for PHPUnit
public PHPUnit\Framework\TestCase :: doubledTypes () : array
 
  • return string []
  • internal This method is not covered by the backward compatibility promise for PHPUnit
public static PHPUnit\Framework\Assert :: equalTo ( $value ) : PHPUnit\Framework\Constraint\IsEqual
public static PHPUnit\Framework\Assert :: equalToCanonicalizing ( $value ) : PHPUnit\Framework\Constraint\IsEqualCanonicalizing
public static PHPUnit\Framework\Assert :: equalToIgnoringCase ( $value ) : PHPUnit\Framework\Constraint\IsEqualIgnoringCase
public static PHPUnit\Framework\Assert :: equalToWithDelta ( $value , float $delta ) : PHPUnit\Framework\Constraint\IsEqualWithDelta
public static PHPUnit\Framework\TestCase :: exactly ( int $count ) : PHPUnit\Framework\MockObject\Rule\InvokedCount
 

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

public PHPUnit\Framework\TestCase :: expectDeprecation () : void
public PHPUnit\Framework\TestCase :: expectDeprecationMessage ( string $message ) : void
public PHPUnit\Framework\TestCase :: expectDeprecationMessageMatches ( string $regularExpression ) : void
public PHPUnit\Framework\TestCase :: expectError () : void
public PHPUnit\Framework\TestCase :: expectErrorMessage ( string $message ) : void
public PHPUnit\Framework\TestCase :: expectErrorMessageMatches ( string $regularExpression ) : void
public PHPUnit\Framework\TestCase :: expectException ( string $exception ) : void
 
  • psalm-param class-string<\Throwable> $exception
public PHPUnit\Framework\TestCase :: expectExceptionCode ( $code ) : void
 
  • param int | string $code
public PHPUnit\Framework\TestCase :: expectExceptionMessage ( string $message ) : void
public PHPUnit\Framework\TestCase :: expectExceptionMessageMatches ( string $regularExpression ) : void
public PHPUnit\Framework\TestCase :: expectExceptionObject ( PHPFUI\PHPUnitSyntaxCoverage\Exception $exception ) : void
 

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.

public PHPUnit\Framework\TestCase :: expectNotice () : void
public PHPUnit\Framework\TestCase :: expectNoticeMessage ( string $message ) : void
public PHPUnit\Framework\TestCase :: expectNoticeMessageMatches ( string $regularExpression ) : void
public PHPUnit\Framework\TestCase :: expectNotToPerformAssertions () : void
public PHPUnit\Framework\TestCase :: expectOutputRegex ( string $expectedRegex ) : void
public PHPUnit\Framework\TestCase :: expectOutputString ( string $expectedString ) : void
public PHPUnit\Framework\TestCase :: expectWarning () : void
public PHPUnit\Framework\TestCase :: expectWarningMessage ( string $message ) : void
public PHPUnit\Framework\TestCase :: expectWarningMessageMatches ( string $regularExpression ) : void
public static PHPUnit\Framework\Assert :: fail ( string $message = '' ) : void
 

Fails a test with the given message.

  • throws AssertionFailedError
  • psalm-return never-return
public static PHPUnit\Framework\Assert :: fileExists () : PHPUnit\Framework\Constraint\FileExists
public PHPUnit\Framework\TestCase :: getActualOutput () : string
 
  • internal This method is not covered by the backward compatibility promise for PHPUnit
public PHPUnit\Framework\TestCase :: getActualOutputForAssertion () : string
public static PHPUnit\Framework\Assert :: getCount () : int
 

Return the current assertion count.

public PHPUnit\Framework\TestCase :: getDataSetAsString ( bool $includeData = true ) : string
 
  • internal This method is not covered by the backward compatibility promise for PHPUnit
public PHPUnit\Framework\TestCase :: getExpectedException () : ? string
 
  • internal This method is not covered by the backward compatibility promise for PHPUnit
public PHPUnit\Framework\TestCase :: getExpectedExceptionCode ()
 
  • return null | int | string
  • internal This method is not covered by the backward compatibility promise for PHPUnit
public PHPUnit\Framework\TestCase :: getExpectedExceptionMessage () : ? string
 
  • internal This method is not covered by the backward compatibility promise for PHPUnit
public PHPUnit\Framework\TestCase :: getExpectedExceptionMessageRegExp () : ? string
 
  • internal This method is not covered by the backward compatibility promise for PHPUnit
public PHPUnit\Framework\TestCase :: getGroups () : array
 
  • internal This method is not covered by the backward compatibility promise for PHPUnit
public PHPUnit\Framework\TestCase :: getMockBuilder ( string $className ) : PHPUnit\Framework\MockObject\MockBuilder
 

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

  • psalm-template RealInstanceType of object
  • psalm-param class-string $className
  • psalm-return MockBuilder
public PHPUnit\Framework\TestCase :: getName ( bool $withDataSet = true ) : string
 
  • throws SebastianBergmann\RecursionContext\InvalidArgumentException
  • internal This method is not covered by the backward compatibility promise for PHPUnit
public PHPUnit\Framework\TestCase :: getNumAssertions () : int
 

Returns the number of assertions performed by this test.

  • internal This method is not covered by the backward compatibility promise for PHPUnit
public PHPUnit\Framework\TestCase :: getProvidedData () : array
 

Gets the data set of a TestCase.

  • internal This method is not covered by the backward compatibility promise for PHPUnit
public PHPUnit\Framework\TestCase :: getResult ()
 
  • internal This method is not covered by the backward compatibility promise for PHPUnit
public PHPUnit\Framework\TestCase :: getSize () : int
 

Returns the size of the test.

  • throws SebastianBergmann\RecursionContext\InvalidArgumentException
  • internal This method is not covered by the backward compatibility promise for PHPUnit
public PHPUnit\Framework\TestCase :: getStatus () : int
public PHPUnit\Framework\TestCase :: getStatusMessage () : string
public PHPUnit\Framework\TestCase :: getTestResultObject () : ? PHPUnit\Framework\TestResult
 
  • internal This method is not covered by the backward compatibility promise for PHPUnit
public static PHPUnit\Framework\Assert :: greaterThan ( $value ) : PHPUnit\Framework\Constraint\GreaterThan
public static PHPUnit\Framework\Assert :: greaterThanOrEqual ( $value ) : PHPUnit\Framework\Constraint\LogicalOr
public PHPUnit\Framework\TestCase :: hasExpectationOnOutput () : bool
 
  • internal This method is not covered by the backward compatibility promise for PHPUnit
public PHPUnit\Framework\TestCase :: hasFailed () : bool
public PHPUnit\Framework\TestCase :: hasOutput () : bool
 
  • internal This method is not covered by the backward compatibility promise for PHPUnit
public PHPUnit\Framework\TestCase :: hasSize () : bool
 
  • throws SebastianBergmann\RecursionContext\InvalidArgumentException
  • internal This method is not covered by the backward compatibility promise for PHPUnit
public static PHPUnit\Framework\Assert :: identicalTo ( $value ) : PHPUnit\Framework\Constraint\IsIdentical
public static PHPUnit\Framework\Assert :: isEmpty () : PHPUnit\Framework\Constraint\IsEmpty
public static PHPUnit\Framework\Assert :: isFalse () : PHPUnit\Framework\Constraint\IsFalse
public static PHPUnit\Framework\Assert :: isFinite () : PHPUnit\Framework\Constraint\IsFinite
public static PHPUnit\Framework\Assert :: isInfinite () : PHPUnit\Framework\Constraint\IsInfinite
public PHPUnit\Framework\TestCase :: isInIsolation () : bool
 
  • internal This method is not covered by the backward compatibility promise for PHPUnit
public static PHPUnit\Framework\Assert :: isInstanceOf ( string $className ) : PHPUnit\Framework\Constraint\IsInstanceOf
public static PHPUnit\Framework\Assert :: isJson () : PHPUnit\Framework\Constraint\IsJson
public PHPUnit\Framework\TestCase :: isLarge () : bool
 
  • throws SebastianBergmann\RecursionContext\InvalidArgumentException
  • internal This method is not covered by the backward compatibility promise for PHPUnit
public PHPUnit\Framework\TestCase :: isMedium () : bool
 
  • throws SebastianBergmann\RecursionContext\InvalidArgumentException
  • internal This method is not covered by the backward compatibility promise for PHPUnit
public static PHPUnit\Framework\Assert :: isNan () : PHPUnit\Framework\Constraint\IsNan
public static PHPUnit\Framework\Assert :: isNull () : PHPUnit\Framework\Constraint\IsNull
public static PHPUnit\Framework\Assert :: isReadable () : PHPUnit\Framework\Constraint\IsReadable
public PHPUnit\Framework\TestCase :: isSmall () : bool
 
  • throws SebastianBergmann\RecursionContext\InvalidArgumentException
  • internal This method is not covered by the backward compatibility promise for PHPUnit
public static PHPUnit\Framework\Assert :: isTrue () : PHPUnit\Framework\Constraint\IsTrue
public static PHPUnit\Framework\Assert :: isType ( string $type ) : PHPUnit\Framework\Constraint\IsType
public static PHPUnit\Framework\Assert :: isWritable () : PHPUnit\Framework\Constraint\IsWritable
public static PHPUnit\Framework\Assert :: lessThan ( $value ) : PHPUnit\Framework\Constraint\LessThan
public static PHPUnit\Framework\Assert :: lessThanOrEqual ( $value ) : PHPUnit\Framework\Constraint\LogicalOr
public static PHPUnit\Framework\Assert :: logicalAnd () : PHPUnit\Framework\Constraint\LogicalAnd
public static PHPUnit\Framework\Assert :: logicalNot ( PHPUnit\Framework\Constraint\Constraint $constraint ) : PHPUnit\Framework\Constraint\LogicalNot
public static PHPUnit\Framework\Assert :: logicalOr () : PHPUnit\Framework\Constraint\LogicalOr
public static PHPUnit\Framework\Assert :: logicalXor () : PHPUnit\Framework\Constraint\LogicalXor
public PHPUnit\Framework\TestCase :: markAsRisky () : void
public static PHPUnit\Framework\Assert :: markTestIncomplete ( string $message = '' ) : void
 

Mark the test as incomplete.

  • throws IncompleteTestError
  • psalm-return never-return
public static PHPUnit\Framework\Assert :: markTestSkipped ( string $message = '' ) : void
 

Mark the test as skipped.

  • throws SkippedTestError
  • throws SyntheticSkippedError
  • psalm-return never-return
public static PHPUnit\Framework\Assert :: matches ( string $string ) : PHPUnit\Framework\Constraint\StringMatchesFormatDescription
public static PHPUnit\Framework\Assert :: matchesRegularExpression ( string $pattern ) : PHPUnit\Framework\Constraint\RegularExpression
public static PHPUnit\Framework\TestCase :: never () : PHPUnit\Framework\MockObject\Rule\InvokedCount
 

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

public static PHPUnit\Framework\Assert :: objectEquals ( object $object , string $method = 'equals' ) : PHPUnit\Framework\Constraint\ObjectEquals
public static PHPUnit\Framework\Assert :: objectHasAttribute ( $attributeName ) : PHPUnit\Framework\Constraint\ObjectHasAttribute
public static PHPUnit\Framework\TestCase :: once () : PHPUnit\Framework\MockObject\Rule\InvokedCount
 

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

public static PHPUnit\Framework\TestCase :: onConsecutiveCalls ( $args ) : PHPUnit\Framework\MockObject\Stub\ConsecutiveCalls
public PHPUnit\Framework\TestCase :: provides () : array
 

Returns the normalized test name as class::method.

  • return list<\ExecutionOrderDependency>
public PHPUnit\Framework\TestCase :: registerComparator ( SebastianBergmann\Comparator\Comparator $comparator ) : void
public PHPUnit\Framework\TestCase :: registerMockObject ( PHPUnit\Framework\MockObject\MockObject $mockObject ) : void
 
  • internal This method is not covered by the backward compatibility promise for PHPUnit
public PHPUnit\Framework\TestCase :: requires () : array
 

Returns a list of normalized dependency names, class::method.

This list can differ from the raw dependencies as the resolver has
no need for the [!][shallow]clone prefix that is filtered out
during normalization.

  • return list<\ExecutionOrderDependency>
public static PHPUnit\Framework\Assert :: resetCount () : void
 

Reset the assertion counter.

public static PHPUnit\Framework\TestCase :: returnArgument ( int $argumentIndex ) : PHPUnit\Framework\MockObject\Stub\ReturnArgument
public static PHPUnit\Framework\TestCase :: returnCallback ( $callback ) : PHPUnit\Framework\MockObject\Stub\ReturnCallback
public static PHPUnit\Framework\TestCase :: returnSelf () : PHPUnit\Framework\MockObject\Stub\ReturnSelf
 

Returns the current object.

This method is useful when mocking a fluent interface.

public static PHPUnit\Framework\TestCase :: returnValue ( $value ) : PHPUnit\Framework\MockObject\Stub\ReturnStub
public static PHPUnit\Framework\TestCase :: returnValueMap ( array $valueMap ) : PHPUnit\Framework\MockObject\Stub\ReturnValueMap
public PHPUnit\Framework\TestCase :: run ( ? PHPUnit\Framework\TestResult $result = NULL ) : PHPUnit\Framework\TestResult
 

Runs the test case and collects the results in a TestResult object.

If no TestResult object is passed a new one will be created.

  • throws SebastianBergmann\CodeCoverage\InvalidArgumentException
  • throws SebastianBergmann\CodeCoverage\UnintentionallyCoveredCodeException
  • throws SebastianBergmann\RecursionContext\InvalidArgumentException
  • throws CodeCoverageException
  • throws UtilException
public PHPUnit\Framework\TestCase :: runBare () : void
 
  • throws Throwable
  • internal This method is not covered by the backward compatibility promise for PHPUnit
public PHPUnit\Framework\TestCase :: setBackupGlobals ( ? bool $backupGlobals ) : void
 
  • internal This method is not covered by the backward compatibility promise for PHPUnit
public PHPUnit\Framework\TestCase :: setBackupStaticAttributes ( ? bool $backupStaticAttributes ) : void
 
  • internal This method is not covered by the backward compatibility promise for PHPUnit
public PHPUnit\Framework\TestCase :: setBeStrictAboutChangesToGlobalState ( ? bool $beStrictAboutChangesToGlobalState ) : void
 
  • internal This method is not covered by the backward compatibility promise for PHPUnit
public PHPUnit\Framework\TestCase :: setDependencies ( array $dependencies ) : void
 
  • param list<\ExecutionOrderDependency> $dependencies
  • internal This method is not covered by the backward compatibility promise for PHPUnit
public PHPUnit\Framework\TestCase :: setDependencyInput ( array $dependencyInput ) : void
 
  • internal This method is not covered by the backward compatibility promise for PHPUnit
public PHPUnit\Framework\TestCase :: setGroups ( array $groups ) : void
 
  • internal This method is not covered by the backward compatibility promise for PHPUnit
public PHPUnit\Framework\TestCase :: setInIsolation ( bool $inIsolation ) : void
 
  • internal This method is not covered by the backward compatibility promise for PHPUnit
public PHPUnit\Framework\TestCase :: setName ( string $name ) : void
 
  • internal This method is not covered by the backward compatibility promise for PHPUnit
public PHPUnit\Framework\TestCase :: setOutputCallback ( callable $callback ) : void
 
  • internal This method is not covered by the backward compatibility promise for PHPUnit
public PHPUnit\Framework\TestCase :: setPreserveGlobalState ( bool $preserveGlobalState ) : void
 
  • internal This method is not covered by the backward compatibility promise for PHPUnit
public PHPUnit\Framework\TestCase :: setRegisterMockObjectsFromTestArgumentsRecursively ( bool $flag ) : void
 
  • internal This method is not covered by the backward compatibility promise for PHPUnit
public PHPUnit\Framework\TestCase :: setResult ( $result ) : void
 
  • internal This method is not covered by the backward compatibility promise for PHPUnit
public PHPUnit\Framework\TestCase :: setRunClassInSeparateProcess ( bool $runClassInSeparateProcess ) : void
 
  • internal This method is not covered by the backward compatibility promise for PHPUnit
public PHPUnit\Framework\TestCase :: setRunTestInSeparateProcess ( bool $runTestInSeparateProcess ) : void
 
  • internal This method is not covered by the backward compatibility promise for PHPUnit
public PHPUnit\Framework\TestCase :: setTestResultObject ( PHPUnit\Framework\TestResult $result ) : void
 
  • internal This method is not covered by the backward compatibility promise for PHPUnit
public static setUpBeforeClass () : void
public skipNamespaceTesting () : self
 

Skip namespace testing

public PHPUnit\Framework\TestCase :: sortId () : string
public static PHPUnit\Framework\Assert :: stringContains ( string $string , bool $case = true ) : PHPUnit\Framework\Constraint\StringContains
public static PHPUnit\Framework\Assert :: stringEndsWith ( string $suffix ) : PHPUnit\Framework\Constraint\StringEndsWith
public static PHPUnit\Framework\Assert :: stringStartsWith ( $prefix ) : PHPUnit\Framework\Constraint\StringStartsWith
public static PHPUnit\Framework\TestCase :: tearDownAfterClass () : void
 

This method is called after the last test of this test class is run.

public static PHPUnit\Framework\TestCase :: throwException ( Throwable $exception ) : PHPUnit\Framework\MockObject\Stub\Exception
public PHPUnit\Framework\TestCase :: toString () : string
 

Returns a string representation of the test case.

public PHPUnit\Framework\TestCase :: usesDataProvider () : bool
 
  • internal This method is not covered by the backward compatibility promise for PHPUnit
Properties
protected PHPUnit\Framework\TestCase :: $backupGlobals
 
  • var ?bool
protected PHPUnit\Framework\TestCase :: $backupGlobalsBlacklist
 
  • var string []
  • deprecated Use $backupGlobalsExcludeList instead
protected PHPUnit\Framework\TestCase :: $backupGlobalsExcludeList
 
  • var string []
protected PHPUnit\Framework\TestCase :: $backupStaticAttributes
 
  • var bool
protected PHPUnit\Framework\TestCase :: $backupStaticAttributesBlacklist
 
  • var array>
  • deprecated Use $backupStaticAttributesExcludeList instead
protected PHPUnit\Framework\TestCase :: $backupStaticAttributesExcludeList
 
  • var array>
protected PHPUnit\Framework\TestCase :: $preserveGlobalState
 
  • var bool
protected PHPUnit\Framework\TestCase :: $providedTests
 
  • var list<\ExecutionOrderDependency>
protected PHPUnit\Framework\TestCase :: $runTestInSeparateProcess
 
  • var bool
Methods
protected PHPUnit\Framework\TestCase :: assertPostConditions () : void
 

Performs assertions shared by all tests of a test case.

This method is called between test and tearDown().

protected PHPUnit\Framework\TestCase :: assertPreConditions () : void
 

Performs assertions shared by all tests of a test case.

This method is called between setUp() and test.

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

Returns a configured mock object for the specified class.

  • psalm-template RealInstanceType of object
  • psalm-param class-string $originalClassName
  • psalm-return MockObject&RealInstanceType
protected PHPUnit\Framework\TestCase :: createMock ( string $originalClassName ) : PHPUnit\Framework\MockObject\MockObject
 

Returns a mock object for the specified class.

  • psalm-template RealInstanceType of object
  • psalm-param class-string $originalClassName
  • psalm-return MockObject&RealInstanceType
protected PHPUnit\Framework\TestCase :: createPartialMock ( string $originalClassName , array $methods ) : PHPUnit\Framework\MockObject\MockObject
 

Returns a partial mock object for the specified class.

  • param string [] $methods
  • psalm-template RealInstanceType of object
  • psalm-param class-string $originalClassName
  • psalm-return MockObject&RealInstanceType
protected PHPUnit\Framework\TestCase :: createResult () : PHPUnit\Framework\TestResult
 

Creates a default TestResult object.

  • internal This method is not covered by the backward compatibility promise for PHPUnit
protected PHPUnit\Framework\TestCase :: createStub ( string $originalClassName ) : PHPUnit\Framework\MockObject\Stub
 

Makes configurable stub for the specified class.

  • psalm-template RealInstanceType of object
  • psalm-param class-string $originalClassName
  • psalm-return Stub&RealInstanceType
protected PHPUnit\Framework\TestCase :: createTestProxy ( string $originalClassName , array $constructorArguments = [ ] ) : PHPUnit\Framework\MockObject\MockObject
 

Returns a test proxy for the specified class.

  • psalm-template RealInstanceType of object
  • psalm-param class-string $originalClassName
  • psalm-return MockObject&RealInstanceType
protected PHPUnit\Framework\TestCase :: getMockClass ( string $originalClassName , $methods = [ ] , array $arguments = [ ] , string $mockClassName = '' , bool $callOriginalConstructor = false , bool $callOriginalClone = true , bool $callAutoload = true , bool $cloneArguments = false ) : string
 

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

  • param null | array $methods $methods
  • psalm-template RealInstanceType of object
  • psalm-param class-string|string $originalClassName
  • psalm-return class-string
protected PHPUnit\Framework\TestCase :: getMockForAbstractClass ( string $originalClassName , array $arguments = [ ] , string $mockClassName = '' , bool $callOriginalConstructor = true , bool $callOriginalClone = true , bool $callAutoload = true , array $mockedMethods = [ ] , bool $cloneArguments = false ) : PHPUnit\Framework\MockObject\MockObject
 

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).

  • psalm-template RealInstanceType of object
  • psalm-param class-string $originalClassName
  • psalm-return MockObject&RealInstanceType
protected PHPUnit\Framework\TestCase :: getMockForTrait ( string $traitName , array $arguments = [ ] , string $mockClassName = '' , bool $callOriginalConstructor = true , bool $callOriginalClone = true , bool $callAutoload = true , array $mockedMethods = [ ] , bool $cloneArguments = false ) : PHPUnit\Framework\MockObject\MockObject
 

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.

  • psalm-param trait-string $traitName
protected PHPUnit\Framework\TestCase :: getMockFromWsdl ( string $wsdlFile , string $originalClassName = '' , string $mockClassName = '' , array $methods = [ ] , bool $callOriginalConstructor = true , array $options = [ ] ) : PHPUnit\Framework\MockObject\MockObject
 

Returns a mock object based on the given WSDL file.

  • psalm-template RealInstanceType of object
  • psalm-param class-string|string $originalClassName
  • psalm-return MockObject&RealInstanceType
protected PHPUnit\Framework\TestCase :: getObjectForTrait ( string $traitName , array $arguments = [ ] , string $traitClassName = '' , bool $callOriginalConstructor = true , bool $callOriginalClone = true , bool $callAutoload = true ) : object
 

Returns an object for the specified trait.

  • psalm-param trait-string $traitName
protected PHPUnit\Framework\TestCase :: iniSet ( string $varName , string $newValue ) : void
 

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.

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

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

  • throws Throwable
protected PHPUnit\Framework\TestCase :: prophesize ( ? string $classOrInterface = NULL ) : Prophecy\Prophecy\ObjectProphecy
 
  • throws Prophecy\Exception\Doubler\ClassNotFoundException
  • throws Prophecy\Exception\Doubler\DoubleException
  • throws Prophecy\Exception\Doubler\InterfaceNotFoundException
  • psalm-param class-string|null $classOrInterface
protected PHPUnit\Framework\TestCase :: recordDoubledType ( string $originalClassName ) : void
protected PHPUnit\Framework\TestCase :: runTest ()
 

Override to run the test and assert its state.

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

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

protected setUp () : void
protected tearDown () : void
Properties
private $classFinder
private static $parser
private $skipDirectories
private $skipNamespaces
private $skipNamespaceTest
private $traverser
Properties
private static $parser
Methods
public static PHPUnit\Framework\TestCase :: any () : PHPUnit\Framework\MockObject\Rule\AnyInvokedCount
 

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

public static PHPUnit\Framework\Assert :: anything () : PHPUnit\Framework\Constraint\IsAnything
public static PHPUnit\Framework\Assert :: arrayHasKey ( $key ) : PHPUnit\Framework\Constraint\ArrayHasKey
 
  • param int | string $key
public static PHPUnit\Framework\Assert :: assertArrayHasKey ( $key , $array , string $message = '' ) : void
 

Asserts that an array has a specified key.

  • param int | string $key
  • param array | ArrayAccess $array
  • throws SebastianBergmann\RecursionContext\InvalidArgumentException
  • throws PHPFUI\PHPUnitSyntaxCoverage\Exception
  • throws ExpectationFailedException
public static PHPUnit\Framework\Assert :: assertArrayNotHasKey ( $key , $array , string $message = '' ) : void
 

Asserts that an array does not have a specified key.

  • param int | string $key
  • param array | ArrayAccess $array
  • throws SebastianBergmann\RecursionContext\InvalidArgumentException
  • throws PHPFUI\PHPUnitSyntaxCoverage\Exception
  • throws ExpectationFailedException
public static PHPUnit\Framework\Assert :: assertClassHasAttribute ( string $attributeName , string $className , string $message = '' ) : void
 

Asserts that a class has a specified attribute.

public static PHPUnit\Framework\Assert :: assertClassHasStaticAttribute ( string $attributeName , string $className , string $message = '' ) : void
 

Asserts that a class has a specified static attribute.

public static PHPUnit\Framework\Assert :: assertClassNotHasAttribute ( string $attributeName , string $className , string $message = '' ) : void
 

Asserts that a class does not have a specified attribute.

public static PHPUnit\Framework\Assert :: assertClassNotHasStaticAttribute ( string $attributeName , string $className , string $message = '' ) : void
 

Asserts that a class does not have a specified static attribute.

public static PHPUnit\Framework\Assert :: assertContains ( $needle , iterable $haystack , string $message = '' ) : void
 

Asserts that a haystack contains a needle.

public static PHPUnit\Framework\Assert :: assertContainsEquals ( $needle , iterable $haystack , string $message = '' ) : void
public static PHPUnit\Framework\Assert :: assertContainsOnly ( string $type , iterable $haystack , ? bool $isNativeType = NULL , string $message = '' ) : void
 

Asserts that a haystack contains only values of a given type.

  • throws SebastianBergmann\RecursionContext\InvalidArgumentException
  • throws ExpectationFailedException
public static PHPUnit\Framework\Assert :: assertContainsOnlyInstancesOf ( string $className , iterable $haystack , string $message = '' ) : void
 

Asserts that a haystack contains only instances of a given class name.

  • throws SebastianBergmann\RecursionContext\InvalidArgumentException
  • throws ExpectationFailedException
public static PHPUnit\Framework\Assert :: assertCount ( int $expectedCount , $haystack , string $message = '' ) : void
 

Asserts the number of elements of an array, Countable or Traversable.

public static PHPUnit\Framework\Assert :: assertDirectoryDoesNotExist ( string $directory , string $message = '' ) : void
 

Asserts that a directory does not exist.

  • throws SebastianBergmann\RecursionContext\InvalidArgumentException
  • throws ExpectationFailedException
public static PHPUnit\Framework\Assert :: assertDirectoryExists ( string $directory , string $message = '' ) : void
 

Asserts that a directory exists.

  • throws SebastianBergmann\RecursionContext\InvalidArgumentException
  • throws ExpectationFailedException
public static PHPUnit\Framework\Assert :: assertDirectoryIsNotReadable ( string $directory , string $message = '' ) : void
 

Asserts that a directory exists and is not readable.

  • throws SebastianBergmann\RecursionContext\InvalidArgumentException
  • throws ExpectationFailedException
public static PHPUnit\Framework\Assert :: assertDirectoryIsNotWritable ( string $directory , string $message = '' ) : void
 

Asserts that a directory exists and is not writable.

  • throws SebastianBergmann\RecursionContext\InvalidArgumentException
  • throws ExpectationFailedException
public static PHPUnit\Framework\Assert :: assertDirectoryIsReadable ( string $directory , string $message = '' ) : void
 

Asserts that a directory exists and is readable.

  • throws SebastianBergmann\RecursionContext\InvalidArgumentException
  • throws ExpectationFailedException
public static PHPUnit\Framework\Assert :: assertDirectoryIsWritable ( string $directory , string $message = '' ) : void
 

Asserts that a directory exists and is writable.

  • throws SebastianBergmann\RecursionContext\InvalidArgumentException
  • throws ExpectationFailedException
public static PHPUnit\Framework\Assert :: assertDirectoryNotExists ( string $directory , string $message = '' ) : void
 

Asserts that a directory does not exist.

  • throws SebastianBergmann\RecursionContext\InvalidArgumentException
  • throws ExpectationFailedException
  • codeCoverageIgnore
  • deprecated https://github.com/sebastianbergmann/phpunit/issues/4068
public static PHPUnit\Framework\Assert :: assertDirectoryNotIsReadable ( string $directory , string $message = '' ) : void
 

Asserts that a directory exists and is not readable.

  • throws SebastianBergmann\RecursionContext\InvalidArgumentException
  • throws ExpectationFailedException
  • codeCoverageIgnore
  • deprecated https://github.com/sebastianbergmann/phpunit/issues/4071
public static PHPUnit\Framework\Assert :: assertDirectoryNotIsWritable ( string $directory , string $message = '' ) : void
 

Asserts that a directory exists and is not writable.

  • throws SebastianBergmann\RecursionContext\InvalidArgumentException
  • throws ExpectationFailedException
  • codeCoverageIgnore
  • deprecated https://github.com/sebastianbergmann/phpunit/issues/4074
public static PHPUnit\Framework\Assert :: assertDoesNotMatchRegularExpression ( string $pattern , string $string , string $message = '' ) : void
 

Asserts that a string does not match a given regular expression.

  • throws SebastianBergmann\RecursionContext\InvalidArgumentException
  • throws ExpectationFailedException
public static PHPUnit\Framework\Assert :: assertEmpty ( $actual , string $message = '' ) : void
 

Asserts that a variable is empty.

  • throws SebastianBergmann\RecursionContext\InvalidArgumentException
  • throws ExpectationFailedException
  • psalm-assert empty $actual
public static PHPUnit\Framework\Assert :: assertEquals ( $expected , $actual , string $message = '' ) : void
 

Asserts that two variables are equal.

  • throws SebastianBergmann\RecursionContext\InvalidArgumentException
  • throws ExpectationFailedException
public static PHPUnit\Framework\Assert :: assertEqualsCanonicalizing ( $expected , $actual , string $message = '' ) : void
 

Asserts that two variables are equal (canonicalizing).

  • throws SebastianBergmann\RecursionContext\InvalidArgumentException
  • throws ExpectationFailedException
public static PHPUnit\Framework\Assert :: assertEqualsIgnoringCase ( $expected , $actual , string $message = '' ) : void
 

Asserts that two variables are equal (ignoring case).

  • throws SebastianBergmann\RecursionContext\InvalidArgumentException
  • throws ExpectationFailedException
public static PHPUnit\Framework\Assert :: assertEqualsWithDelta ( $expected , $actual , float $delta , string $message = '' ) : void
 

Asserts that two variables are equal (with delta).

  • throws SebastianBergmann\RecursionContext\InvalidArgumentException
  • throws ExpectationFailedException
public static PHPUnit\Framework\Assert :: assertEqualXMLStructure ( DOMElement $expectedElement , DOMElement $actualElement , bool $checkAttributes = false , string $message = '' ) : void
 

Asserts that a hierarchy of DOMElements matches.

  • throws SebastianBergmann\RecursionContext\InvalidArgumentException
  • throws AssertionFailedError
  • throws ExpectationFailedException
  • codeCoverageIgnore
  • deprecated https://github.com/sebastianbergmann/phpunit/issues/4091
public static PHPUnit\Framework\Assert :: assertFalse ( $condition , string $message = '' ) : void
 

Asserts that a condition is false.

  • throws SebastianBergmann\RecursionContext\InvalidArgumentException
  • throws ExpectationFailedException
  • psalm-assert false $condition
public static PHPUnit\Framework\Assert :: assertFileDoesNotExist ( string $filename , string $message = '' ) : void
 

Asserts that a file does not exist.

  • throws SebastianBergmann\RecursionContext\InvalidArgumentException
  • throws ExpectationFailedException
public static PHPUnit\Framework\Assert :: assertFileEquals ( string $expected , string $actual , string $message = '' ) : void
 

Asserts that the contents of one file is equal to the contents of another
file.

  • throws SebastianBergmann\RecursionContext\InvalidArgumentException
  • throws ExpectationFailedException
public static PHPUnit\Framework\Assert :: assertFileEqualsCanonicalizing ( string $expected , string $actual , string $message = '' ) : void
 

Asserts that the contents of one file is equal to the contents of another
file (canonicalizing).

  • throws SebastianBergmann\RecursionContext\InvalidArgumentException
  • throws ExpectationFailedException
public static PHPUnit\Framework\Assert :: assertFileEqualsIgnoringCase ( string $expected , string $actual , string $message = '' ) : void
 

Asserts that the contents of one file is equal to the contents of another
file (ignoring case).

  • throws SebastianBergmann\RecursionContext\InvalidArgumentException
  • throws ExpectationFailedException
public static PHPUnit\Framework\Assert :: assertFileExists ( string $filename , string $message = '' ) : void
 

Asserts that a file exists.

  • throws SebastianBergmann\RecursionContext\InvalidArgumentException
  • throws ExpectationFailedException
public static PHPUnit\Framework\Assert :: assertFileIsNotReadable ( string $file , string $message = '' ) : void
 

Asserts that a file exists and is not readable.

  • throws SebastianBergmann\RecursionContext\InvalidArgumentException
  • throws ExpectationFailedException
public static PHPUnit\Framework\Assert :: assertFileIsNotWritable ( string $file , string $message = '' ) : void
 

Asserts that a file exists and is not writable.

  • throws SebastianBergmann\RecursionContext\InvalidArgumentException
  • throws ExpectationFailedException
public static PHPUnit\Framework\Assert :: assertFileIsReadable ( string $file , string $message = '' ) : void
 

Asserts that a file exists and is readable.

  • throws SebastianBergmann\RecursionContext\InvalidArgumentException
  • throws ExpectationFailedException
public static PHPUnit\Framework\Assert :: assertFileIsWritable ( string $file , string $message = '' ) : void
 

Asserts that a file exists and is writable.

  • throws SebastianBergmann\RecursionContext\InvalidArgumentException
  • throws ExpectationFailedException
public static PHPUnit\Framework\Assert :: assertFileNotEquals ( string $expected , string $actual , string $message = '' ) : void
 

Asserts that the contents of one file is not equal to the contents of
another file.

  • throws SebastianBergmann\RecursionContext\InvalidArgumentException
  • throws ExpectationFailedException
public static PHPUnit\Framework\Assert :: assertFileNotEqualsCanonicalizing ( string $expected , string $actual , string $message = '' ) : void
 

Asserts that the contents of one file is not equal to the contents of another
file (canonicalizing).

  • throws SebastianBergmann\RecursionContext\InvalidArgumentException
  • throws ExpectationFailedException
public static PHPUnit\Framework\Assert :: assertFileNotEqualsIgnoringCase ( string $expected , string $actual , string $message = '' ) : void
 

Asserts that the contents of one file is not equal to the contents of another
file (ignoring case).

  • throws SebastianBergmann\RecursionContext\InvalidArgumentException
  • throws ExpectationFailedException
public static PHPUnit\Framework\Assert :: assertFileNotExists ( string $filename , string $message = '' ) : void
 

Asserts that a file does not exist.

  • throws SebastianBergmann\RecursionContext\InvalidArgumentException
  • throws ExpectationFailedException
  • codeCoverageIgnore
  • deprecated https://github.com/sebastianbergmann/phpunit/issues/4077
public static PHPUnit\Framework\Assert :: assertFileNotIsReadable ( string $file , string $message = '' ) : void
 

Asserts that a file exists and is not readable.

  • throws SebastianBergmann\RecursionContext\InvalidArgumentException
  • throws ExpectationFailedException
  • codeCoverageIgnore
  • deprecated https://github.com/sebastianbergmann/phpunit/issues/4080
public static PHPUnit\Framework\Assert :: assertFileNotIsWritable ( string $file , string $message = '' ) : void
 

Asserts that a file exists and is not writable.

  • throws SebastianBergmann\RecursionContext\InvalidArgumentException
  • throws ExpectationFailedException
  • codeCoverageIgnore
  • deprecated https://github.com/sebastianbergmann/phpunit/issues/4083
public static PHPUnit\Framework\Assert :: assertFinite ( $actual , string $message = '' ) : void
 

Asserts that a variable is finite.

  • throws SebastianBergmann\RecursionContext\InvalidArgumentException
  • throws ExpectationFailedException
public static PHPUnit\Framework\Assert :: assertGreaterThan ( $expected , $actual , string $message = '' ) : void
 

Asserts that a value is greater than another value.

  • throws SebastianBergmann\RecursionContext\InvalidArgumentException
  • throws ExpectationFailedException
public static PHPUnit\Framework\Assert :: assertGreaterThanOrEqual ( $expected , $actual , string $message = '' ) : void
 

Asserts that a value is greater than or equal to another value.

  • throws SebastianBergmann\RecursionContext\InvalidArgumentException
  • throws ExpectationFailedException
public static PHPUnit\Framework\Assert :: assertInfinite ( $actual , string $message = '' ) : void
 

Asserts that a variable is infinite.

  • throws SebastianBergmann\RecursionContext\InvalidArgumentException
  • throws ExpectationFailedException
public static PHPUnit\Framework\Assert :: assertInstanceOf ( string $expected , $actual , string $message = '' ) : void
 

Asserts that a variable is of a given type.

  • throws SebastianBergmann\RecursionContext\InvalidArgumentException
  • throws PHPFUI\PHPUnitSyntaxCoverage\Exception
  • throws ExpectationFailedException
  • psalm-template ExpectedType of object
  • psalm-param class-string $expected
  • psalm-assert =ExpectedType $actual
public static PHPUnit\Framework\Assert :: assertIsArray ( $actual , string $message = '' ) : void
 

Asserts that a variable is of type array.

  • throws SebastianBergmann\RecursionContext\InvalidArgumentException
  • throws ExpectationFailedException
  • psalm-assert array $actual
public static PHPUnit\Framework\Assert :: assertIsBool ( $actual , string $message = '' ) : void
 

Asserts that a variable is of type bool.

  • throws SebastianBergmann\RecursionContext\InvalidArgumentException
  • throws ExpectationFailedException
  • psalm-assert bool $actual
public static PHPUnit\Framework\Assert :: assertIsCallable ( $actual , string $message = '' ) : void
 

Asserts that a variable is of type callable.

  • throws SebastianBergmann\RecursionContext\InvalidArgumentException
  • throws ExpectationFailedException
  • psalm-assert callable $actual
public static PHPUnit\Framework\Assert :: assertIsClosedResource ( $actual , string $message = '' ) : void
 

Asserts that a variable is of type resource and is closed.

  • throws SebastianBergmann\RecursionContext\InvalidArgumentException
  • throws ExpectationFailedException
  • psalm-assert resource $actual
public static PHPUnit\Framework\Assert :: assertIsFloat ( $actual , string $message = '' ) : void
 

Asserts that a variable is of type float.

  • throws SebastianBergmann\RecursionContext\InvalidArgumentException
  • throws ExpectationFailedException
  • psalm-assert float $actual
public static PHPUnit\Framework\Assert :: assertIsInt ( $actual , string $message = '' ) : void
 

Asserts that a variable is of type int.

  • throws SebastianBergmann\RecursionContext\InvalidArgumentException
  • throws ExpectationFailedException
  • psalm-assert int $actual
public static PHPUnit\Framework\Assert :: assertIsIterable ( $actual , string $message = '' ) : void
 

Asserts that a variable is of type iterable.

  • throws SebastianBergmann\RecursionContext\InvalidArgumentException
  • throws ExpectationFailedException
  • psalm-assert iterable $actual
public static PHPUnit\Framework\Assert :: assertIsNotArray ( $actual , string $message = '' ) : void
 

Asserts that a variable is not of type array.

  • throws SebastianBergmann\RecursionContext\InvalidArgumentException
  • throws ExpectationFailedException
  • psalm-assert !array $actual
public static PHPUnit\Framework\Assert :: assertIsNotBool ( $actual , string $message = '' ) : void
 

Asserts that a variable is not of type bool.

  • throws SebastianBergmann\RecursionContext\InvalidArgumentException
  • throws ExpectationFailedException
  • psalm-assert !bool $actual
public static PHPUnit\Framework\Assert :: assertIsNotCallable ( $actual , string $message = '' ) : void
 

Asserts that a variable is not of type callable.

  • throws SebastianBergmann\RecursionContext\InvalidArgumentException
  • throws ExpectationFailedException
  • psalm-assert !callable $actual
public static PHPUnit\Framework\Assert :: assertIsNotClosedResource ( $actual , string $message = '' ) : void
 

Asserts that a variable is not of type resource.

  • throws SebastianBergmann\RecursionContext\InvalidArgumentException
  • throws ExpectationFailedException
  • psalm-assert !resource $actual
public static PHPUnit\Framework\Assert :: assertIsNotFloat ( $actual , string $message = '' ) : void
 

Asserts that a variable is not of type float.

  • throws SebastianBergmann\RecursionContext\InvalidArgumentException
  • throws ExpectationFailedException
  • psalm-assert !float $actual
public static PHPUnit\Framework\Assert :: assertIsNotInt ( $actual , string $message = '' ) : void
 

Asserts that a variable is not of type int.

  • throws SebastianBergmann\RecursionContext\InvalidArgumentException
  • throws ExpectationFailedException
  • psalm-assert !int $actual
public static PHPUnit\Framework\Assert :: assertIsNotIterable ( $actual , string $message = '' ) : void
 

Asserts that a variable is not of type iterable.

  • throws SebastianBergmann\RecursionContext\InvalidArgumentException
  • throws ExpectationFailedException
  • psalm-assert !iterable $actual
public static PHPUnit\Framework\Assert :: assertIsNotNumeric ( $actual , string $message = '' ) : void
 

Asserts that a variable is not of type numeric.

  • throws SebastianBergmann\RecursionContext\InvalidArgumentException
  • throws ExpectationFailedException
  • psalm-assert !numeric $actual
public static PHPUnit\Framework\Assert :: assertIsNotObject ( $actual , string $message = '' ) : void
 

Asserts that a variable is not of type object.

  • throws SebastianBergmann\RecursionContext\InvalidArgumentException
  • throws ExpectationFailedException
  • psalm-assert !object $actual
public static PHPUnit\Framework\Assert :: assertIsNotReadable ( string $filename , string $message = '' ) : void
 

Asserts that a file/dir exists and is not readable.

  • throws SebastianBergmann\RecursionContext\InvalidArgumentException
  • throws ExpectationFailedException
public static PHPUnit\Framework\Assert :: assertIsNotResource ( $actual , string $message = '' ) : void
 

Asserts that a variable is not of type resource.

  • throws SebastianBergmann\RecursionContext\InvalidArgumentException
  • throws ExpectationFailedException
  • psalm-assert !resource $actual
public static PHPUnit\Framework\Assert :: assertIsNotScalar ( $actual , string $message = '' ) : void
 

Asserts that a variable is not of type scalar.

  • throws SebastianBergmann\RecursionContext\InvalidArgumentException
  • throws ExpectationFailedException
  • psalm-assert !scalar $actual
public static PHPUnit\Framework\Assert :: assertIsNotString ( $actual , string $message = '' ) : void
 

Asserts that a variable is not of type string.

  • throws SebastianBergmann\RecursionContext\InvalidArgumentException
  • throws ExpectationFailedException
  • psalm-assert !string $actual
public static PHPUnit\Framework\Assert :: assertIsNotWritable ( string $filename , string $message = '' ) : void
 

Asserts that a file/dir exists and is not writable.

  • throws SebastianBergmann\RecursionContext\InvalidArgumentException
  • throws ExpectationFailedException
public static PHPUnit\Framework\Assert :: assertIsNumeric ( $actual , string $message = '' ) : void
 

Asserts that a variable is of type numeric.

  • throws SebastianBergmann\RecursionContext\InvalidArgumentException
  • throws ExpectationFailedException
  • psalm-assert numeric $actual
public static PHPUnit\Framework\Assert :: assertIsObject ( $actual , string $message = '' ) : void
 

Asserts that a variable is of type object.

  • throws SebastianBergmann\RecursionContext\InvalidArgumentException
  • throws ExpectationFailedException
  • psalm-assert object $actual
public static PHPUnit\Framework\Assert :: assertIsReadable ( string $filename , string $message = '' ) : void
 

Asserts that a file/dir is readable.

  • throws SebastianBergmann\RecursionContext\InvalidArgumentException
  • throws ExpectationFailedException
public static PHPUnit\Framework\Assert :: assertIsResource ( $actual , string $message = '' ) : void
 

Asserts that a variable is of type resource.

  • throws SebastianBergmann\RecursionContext\InvalidArgumentException
  • throws ExpectationFailedException
  • psalm-assert resource $actual
public static PHPUnit\Framework\Assert :: assertIsScalar ( $actual , string $message = '' ) : void
 

Asserts that a variable is of type scalar.

  • throws SebastianBergmann\RecursionContext\InvalidArgumentException
  • throws ExpectationFailedException
  • psalm-assert scalar $actual
public static PHPUnit\Framework\Assert :: assertIsString ( $actual , string $message = '' ) : void
 

Asserts that a variable is of type string.

  • throws SebastianBergmann\RecursionContext\InvalidArgumentException
  • throws ExpectationFailedException
  • psalm-assert string $actual
public static PHPUnit\Framework\Assert :: assertIsWritable ( string $filename , string $message = '' ) : void
 

Asserts that a file/dir exists and is writable.

  • throws SebastianBergmann\RecursionContext\InvalidArgumentException
  • throws ExpectationFailedException
public static PHPUnit\Framework\Assert :: assertJson ( string $actualJson , string $message = '' ) : void
 

Asserts that a string is a valid JSON string.

  • throws SebastianBergmann\RecursionContext\InvalidArgumentException
  • throws ExpectationFailedException
public static PHPUnit\Framework\Assert :: assertJsonFileEqualsJsonFile ( string $expectedFile , string $actualFile , string $message = '' ) : void
 

Asserts that two JSON files are equal.

  • throws SebastianBergmann\RecursionContext\InvalidArgumentException
  • throws ExpectationFailedException
public static PHPUnit\Framework\Assert :: assertJsonFileNotEqualsJsonFile ( string $expectedFile , string $actualFile , string $message = '' ) : void
 

Asserts that two JSON files are not equal.

  • throws SebastianBergmann\RecursionContext\InvalidArgumentException
  • throws ExpectationFailedException
public static PHPUnit\Framework\Assert :: assertJsonStringEqualsJsonFile ( string $expectedFile , string $actualJson , string $message = '' ) : void
 

Asserts that the generated JSON encoded object and the content of the given file are equal.

  • throws SebastianBergmann\RecursionContext\InvalidArgumentException
  • throws ExpectationFailedException
public static PHPUnit\Framework\Assert :: assertJsonStringEqualsJsonString ( string $expectedJson , string $actualJson , string $message = '' ) : void
 

Asserts that two given JSON encoded objects or arrays are equal.

  • throws SebastianBergmann\RecursionContext\InvalidArgumentException
  • throws ExpectationFailedException
public static PHPUnit\Framework\Assert :: assertJsonStringNotEqualsJsonFile ( string $expectedFile , string $actualJson , string $message = '' ) : void
 

Asserts that the generated JSON encoded object and the content of the given file are not equal.

  • throws SebastianBergmann\RecursionContext\InvalidArgumentException
  • throws ExpectationFailedException
public static PHPUnit\Framework\Assert :: assertJsonStringNotEqualsJsonString ( $expectedJson , $actualJson , string $message = '' ) : void
 

Asserts that two given JSON encoded objects or arrays are not equal.

  • param string $expectedJson
  • param string $actualJson
  • throws SebastianBergmann\RecursionContext\InvalidArgumentException
  • throws ExpectationFailedException
public static PHPUnit\Framework\Assert :: assertLessThan ( $expected , $actual , string $message = '' ) : void
 

Asserts that a value is smaller than another value.

  • throws SebastianBergmann\RecursionContext\InvalidArgumentException
  • throws ExpectationFailedException
public static PHPUnit\Framework\Assert :: assertLessThanOrEqual ( $expected , $actual , string $message = '' ) : void
 

Asserts that a value is smaller than or equal to another value.

  • throws SebastianBergmann\RecursionContext\InvalidArgumentException
  • throws ExpectationFailedException
public static PHPUnit\Framework\Assert :: assertMatchesRegularExpression ( string $pattern , string $string , string $message = '' ) : void
 

Asserts that a string matches a given regular expression.

  • throws SebastianBergmann\RecursionContext\InvalidArgumentException
  • throws ExpectationFailedException
public static PHPUnit\Framework\Assert :: assertNan ( $actual , string $message = '' ) : void
 

Asserts that a variable is nan.

  • throws SebastianBergmann\RecursionContext\InvalidArgumentException
  • throws ExpectationFailedException
public static PHPUnit\Framework\Assert :: assertNotContains ( $needle , iterable $haystack , string $message = '' ) : void
 

Asserts that a haystack does not contain a needle.

public static PHPUnit\Framework\Assert :: assertNotContainsEquals ( $needle , iterable $haystack , string $message = '' ) : void
public static PHPUnit\Framework\Assert :: assertNotContainsOnly ( string $type , iterable $haystack , ? bool $isNativeType = NULL , string $message = '' ) : void
 

Asserts that a haystack does not contain only values of a given type.

  • throws SebastianBergmann\RecursionContext\InvalidArgumentException
  • throws ExpectationFailedException
public static PHPUnit\Framework\Assert :: assertNotCount ( int $expectedCount , $haystack , string $message = '' ) : void
 

Asserts the number of elements of an array, Countable or Traversable.

public static PHPUnit\Framework\Assert :: assertNotEmpty ( $actual , string $message = '' ) : void
 

Asserts that a variable is not empty.

  • throws SebastianBergmann\RecursionContext\InvalidArgumentException
  • throws ExpectationFailedException
  • psalm-assert !empty $actual
public static PHPUnit\Framework\Assert :: assertNotEquals ( $expected , $actual , string $message = '' ) : void
 

Asserts that two variables are not equal.

  • throws SebastianBergmann\RecursionContext\InvalidArgumentException
  • throws ExpectationFailedException
public static PHPUnit\Framework\Assert :: assertNotEqualsCanonicalizing ( $expected , $actual , string $message = '' ) : void
 

Asserts that two variables are not equal (canonicalizing).

  • throws SebastianBergmann\RecursionContext\InvalidArgumentException
  • throws ExpectationFailedException
public static PHPUnit\Framework\Assert :: assertNotEqualsIgnoringCase ( $expected , $actual , string $message = '' ) : void
 

Asserts that two variables are not equal (ignoring case).

  • throws SebastianBergmann\RecursionContext\InvalidArgumentException
  • throws ExpectationFailedException
public static PHPUnit\Framework\Assert :: assertNotEqualsWithDelta ( $expected , $actual , float $delta , string $message = '' ) : void
 

Asserts that two variables are not equal (with delta).

  • throws SebastianBergmann\RecursionContext\InvalidArgumentException
  • throws ExpectationFailedException
public static PHPUnit\Framework\Assert :: assertNotFalse ( $condition , string $message = '' ) : void
 

Asserts that a condition is not false.

  • throws SebastianBergmann\RecursionContext\InvalidArgumentException
  • throws ExpectationFailedException
  • psalm-assert !false $condition
public static PHPUnit\Framework\Assert :: assertNotInstanceOf ( string $expected , $actual , string $message = '' ) : void
 

Asserts that a variable is not of a given type.

  • throws SebastianBergmann\RecursionContext\InvalidArgumentException
  • throws PHPFUI\PHPUnitSyntaxCoverage\Exception
  • throws ExpectationFailedException
  • psalm-template ExpectedType of object
  • psalm-param class-string $expected
  • psalm-assert !ExpectedType $actual
public static PHPUnit\Framework\Assert :: assertNotIsReadable ( string $filename , string $message = '' ) : void
 

Asserts that a file/dir exists and is not readable.

  • throws SebastianBergmann\RecursionContext\InvalidArgumentException
  • throws ExpectationFailedException
  • codeCoverageIgnore
  • deprecated https://github.com/sebastianbergmann/phpunit/issues/4062
public static PHPUnit\Framework\Assert :: assertNotIsWritable ( string $filename , string $message = '' ) : void
 

Asserts that a file/dir exists and is not writable.

  • throws SebastianBergmann\RecursionContext\InvalidArgumentException
  • throws ExpectationFailedException
  • codeCoverageIgnore
  • deprecated https://github.com/sebastianbergmann/phpunit/issues/4065
public static PHPUnit\Framework\Assert :: assertNotNull ( $actual , string $message = '' ) : void
 

Asserts that a variable is not null.

  • throws SebastianBergmann\RecursionContext\InvalidArgumentException
  • throws ExpectationFailedException
  • psalm-assert !null $actual
public static PHPUnit\Framework\Assert :: assertNotRegExp ( string $pattern , string $string , string $message = '' ) : void
 

Asserts that a string does not match a given regular expression.

  • throws SebastianBergmann\RecursionContext\InvalidArgumentException
  • throws ExpectationFailedException
  • codeCoverageIgnore
  • deprecated https://github.com/sebastianbergmann/phpunit/issues/4089
public static PHPUnit\Framework\Assert :: assertNotSame ( $expected , $actual , string $message = '' ) : void
 

Asserts that two variables do not have the same type and value.

Used on objects, it asserts that two variables do not reference
the same object.

  • throws SebastianBergmann\RecursionContext\InvalidArgumentException
  • throws ExpectationFailedException
public static PHPUnit\Framework\Assert :: assertNotSameSize ( $expected , $actual , string $message = '' ) : void
 

Assert that the size of two arrays (or Countable or Traversable objects)
is not the same.

  • param Countable | iterable $expected
  • param Countable | iterable $actual
  • throws SebastianBergmann\RecursionContext\InvalidArgumentException
  • throws PHPFUI\PHPUnitSyntaxCoverage\Exception
  • throws ExpectationFailedException
public static PHPUnit\Framework\Assert :: assertNotTrue ( $condition , string $message = '' ) : void
 

Asserts that a condition is not true.

  • throws SebastianBergmann\RecursionContext\InvalidArgumentException
  • throws ExpectationFailedException
  • psalm-assert !true $condition
public static PHPUnit\Framework\Assert :: assertNull ( $actual , string $message = '' ) : void
 

Asserts that a variable is null.

  • throws SebastianBergmann\RecursionContext\InvalidArgumentException
  • throws ExpectationFailedException
  • psalm-assert null $actual
public static PHPUnit\Framework\Assert :: assertObjectEquals ( object $expected , object $actual , string $method = 'equals' , string $message = '' ) : void
 
  • throws ExpectationFailedException
public static PHPUnit\Framework\Assert :: assertObjectHasAttribute ( string $attributeName , $object , string $message = '' ) : void
 

Asserts that an object has a specified attribute.

public static PHPUnit\Framework\Assert :: assertObjectNotHasAttribute ( string $attributeName , $object , string $message = '' ) : void
 

Asserts that an object does not have a specified attribute.

public static PHPUnit\Framework\Assert :: assertRegExp ( string $pattern , string $string , string $message = '' ) : void
 

Asserts that a string matches a given regular expression.

  • throws SebastianBergmann\RecursionContext\InvalidArgumentException
  • throws ExpectationFailedException
  • codeCoverageIgnore
  • deprecated https://github.com/sebastianbergmann/phpunit/issues/4086
public static PHPUnit\Framework\Assert :: assertSame ( $expected , $actual , string $message = '' ) : void
 

Asserts that two variables have the same type and value.

Used on objects, it asserts that two variables reference
the same object.

  • throws SebastianBergmann\RecursionContext\InvalidArgumentException
  • throws ExpectationFailedException
  • psalm-template ExpectedType
  • psalm-param ExpectedType $expected
  • psalm-assert =ExpectedType $actual
public static PHPUnit\Framework\Assert :: assertSameSize ( $expected , $actual , string $message = '' ) : void
 

Assert that the size of two arrays (or Countable or Traversable objects)
is the same.

  • param Countable | iterable $expected
  • param Countable | iterable $actual
  • throws SebastianBergmann\RecursionContext\InvalidArgumentException
  • throws PHPFUI\PHPUnitSyntaxCoverage\Exception
  • throws ExpectationFailedException
public static PHPUnit\Framework\Assert :: assertStringContainsString ( string $needle , string $haystack , string $message = '' ) : void
 
  • throws SebastianBergmann\RecursionContext\InvalidArgumentException
  • throws ExpectationFailedException
public static PHPUnit\Framework\Assert :: assertStringContainsStringIgnoringCase ( string $needle , string $haystack , string $message = '' ) : void
 
  • throws SebastianBergmann\RecursionContext\InvalidArgumentException
  • throws ExpectationFailedException
public static PHPUnit\Framework\Assert :: assertStringEndsNotWith ( string $suffix , string $string , string $message = '' ) : void
 

Asserts that a string ends not with a given suffix.

  • throws SebastianBergmann\RecursionContext\InvalidArgumentException
  • throws ExpectationFailedException
public static PHPUnit\Framework\Assert :: assertStringEndsWith ( string $suffix , string $string , string $message = '' ) : void
 

Asserts that a string ends with a given suffix.

  • throws SebastianBergmann\RecursionContext\InvalidArgumentException
  • throws ExpectationFailedException
public static PHPUnit\Framework\Assert :: assertStringEqualsFile ( string $expectedFile , string $actualString , string $message = '' ) : void
 

Asserts that the contents of a string is equal
to the contents of a file.

  • throws SebastianBergmann\RecursionContext\InvalidArgumentException
  • throws ExpectationFailedException
public static PHPUnit\Framework\Assert :: assertStringEqualsFileCanonicalizing ( string $expectedFile , string $actualString , string $message = '' ) : void
 

Asserts that the contents of a string is equal
to the contents of a file (canonicalizing).

  • throws SebastianBergmann\RecursionContext\InvalidArgumentException
  • throws ExpectationFailedException
public static PHPUnit\Framework\Assert :: assertStringEqualsFileIgnoringCase ( string $expectedFile , string $actualString , string $message = '' ) : void
 

Asserts that the contents of a string is equal
to the contents of a file (ignoring case).

  • throws SebastianBergmann\RecursionContext\InvalidArgumentException
  • throws ExpectationFailedException
public static PHPUnit\Framework\Assert :: assertStringMatchesFormat ( string $format , string $string , string $message = '' ) : void
 

Asserts that a string matches a given format string.

  • throws SebastianBergmann\RecursionContext\InvalidArgumentException
  • throws ExpectationFailedException
public static PHPUnit\Framework\Assert :: assertStringMatchesFormatFile ( string $formatFile , string $string , string $message = '' ) : void
 

Asserts that a string matches a given format file.

  • throws SebastianBergmann\RecursionContext\InvalidArgumentException
  • throws ExpectationFailedException
public static PHPUnit\Framework\Assert :: assertStringNotContainsString ( string $needle , string $haystack , string $message = '' ) : void
 
  • throws SebastianBergmann\RecursionContext\InvalidArgumentException
  • throws ExpectationFailedException
public static PHPUnit\Framework\Assert :: assertStringNotContainsStringIgnoringCase ( string $needle , string $haystack , string $message = '' ) : void
 
  • throws SebastianBergmann\RecursionContext\InvalidArgumentException
  • throws ExpectationFailedException
public static PHPUnit\Framework\Assert :: assertStringNotEqualsFile ( string $expectedFile , string $actualString , string $message = '' ) : void
 

Asserts that the contents of a string is not equal
to the contents of a file.

  • throws SebastianBergmann\RecursionContext\InvalidArgumentException
  • throws ExpectationFailedException
public static PHPUnit\Framework\Assert :: assertStringNotEqualsFileCanonicalizing ( string $expectedFile , string $actualString , string $message = '' ) : void
 

Asserts that the contents of a string is not equal
to the contents of a file (canonicalizing).

  • throws SebastianBergmann\RecursionContext\InvalidArgumentException
  • throws ExpectationFailedException
public static PHPUnit\Framework\Assert :: assertStringNotEqualsFileIgnoringCase ( string $expectedFile , string $actualString , string $message = '' ) : void
 

Asserts that the contents of a string is not equal
to the contents of a file (ignoring case).

  • throws SebastianBergmann\RecursionContext\InvalidArgumentException
  • throws ExpectationFailedException
public static PHPUnit\Framework\Assert :: assertStringNotMatchesFormat ( string $format , string $string , string $message = '' ) : void
 

Asserts that a string does not match a given format string.

  • throws SebastianBergmann\RecursionContext\InvalidArgumentException
  • throws ExpectationFailedException
public static PHPUnit\Framework\Assert :: assertStringNotMatchesFormatFile ( string $formatFile , string $string , string $message = '' ) : void
 

Asserts that a string does not match a given format string.

  • throws SebastianBergmann\RecursionContext\InvalidArgumentException
  • throws ExpectationFailedException
public static PHPUnit\Framework\Assert :: assertStringStartsNotWith ( $prefix , $string , string $message = '' ) : void
 

Asserts that a string starts not with a given prefix.

  • param string $prefix
  • param string $string
  • throws SebastianBergmann\RecursionContext\InvalidArgumentException
  • throws ExpectationFailedException
public static PHPUnit\Framework\Assert :: assertStringStartsWith ( string $prefix , string $string , string $message = '' ) : void
 

Asserts that a string starts with a given prefix.

  • throws SebastianBergmann\RecursionContext\InvalidArgumentException
  • throws ExpectationFailedException
public static PHPUnit\Framework\Assert :: assertThat ( $value , PHPUnit\Framework\Constraint\Constraint $constraint , string $message = '' ) : void
 

Evaluates a PHPUnit\Framework\Constraint matcher object.

  • throws SebastianBergmann\RecursionContext\InvalidArgumentException
  • throws ExpectationFailedException
public static PHPUnit\Framework\Assert :: assertTrue ( $condition , string $message = '' ) : void
 

Asserts that a condition is true.

  • throws SebastianBergmann\RecursionContext\InvalidArgumentException
  • throws ExpectationFailedException
  • psalm-assert true $condition
public static PHPUnit\Framework\Assert :: assertXmlFileEqualsXmlFile ( string $expectedFile , string $actualFile , string $message = '' ) : void
 

Asserts that two XML files are equal.

public static PHPUnit\Framework\Assert :: assertXmlFileNotEqualsXmlFile ( string $expectedFile , string $actualFile , string $message = '' ) : void
 

Asserts that two XML files are not equal.

  • throws PHPUnit\Util\Exception
  • throws SebastianBergmann\RecursionContext\InvalidArgumentException
  • throws ExpectationFailedException
public static PHPUnit\Framework\Assert :: assertXmlStringEqualsXmlFile ( string $expectedFile , $actualXml , string $message = '' ) : void
 

Asserts that two XML documents are equal.

  • param DOMDocument | string $actualXml
  • throws PHPUnit\Util\Xml\Exception
  • throws SebastianBergmann\RecursionContext\InvalidArgumentException
  • throws ExpectationFailedException
public static PHPUnit\Framework\Assert :: assertXmlStringEqualsXmlString ( $expectedXml , $actualXml , string $message = '' ) : void
 

Asserts that two XML documents are equal.

  • param DOMDocument | string $expectedXml
  • param DOMDocument | string $actualXml
  • throws PHPUnit\Util\Xml\Exception
  • throws SebastianBergmann\RecursionContext\InvalidArgumentException
  • throws ExpectationFailedException
public static PHPUnit\Framework\Assert :: assertXmlStringNotEqualsXmlFile ( string $expectedFile , $actualXml , string $message = '' ) : void
 

Asserts that two XML documents are not equal.

  • param DOMDocument | string $actualXml
  • throws PHPUnit\Util\Xml\Exception
  • throws SebastianBergmann\RecursionContext\InvalidArgumentException
  • throws ExpectationFailedException
public static PHPUnit\Framework\Assert :: assertXmlStringNotEqualsXmlString ( $expectedXml , $actualXml , string $message = '' ) : void
 

Asserts that two XML documents are not equal.

  • param DOMDocument | string $expectedXml
  • param DOMDocument | string $actualXml
  • throws PHPUnit\Util\Xml\Exception
  • throws SebastianBergmann\RecursionContext\InvalidArgumentException
  • throws ExpectationFailedException
public static PHPUnit\Framework\TestCase :: at ( int $index ) : PHPUnit\Framework\MockObject\Rule\InvokedAtIndex
 

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

  • deprecated https://github.com/sebastianbergmann/phpunit/issues/4297
  • codeCoverageIgnore
public static PHPUnit\Framework\TestCase :: atLeast ( int $requiredInvocations ) : PHPUnit\Framework\MockObject\Rule\InvokedAtLeastCount
 

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

public static PHPUnit\Framework\TestCase :: atLeastOnce () : PHPUnit\Framework\MockObject\Rule\InvokedAtLeastOnce
 

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

public static PHPUnit\Framework\TestCase :: atMost ( int $allowedInvocations ) : PHPUnit\Framework\MockObject\Rule\InvokedAtMostCount
 

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

public static PHPUnit\Framework\Assert :: callback ( callable $callback ) : PHPUnit\Framework\Constraint\Callback
 
  • psalm-template CallbackInput of mixed
  • psalm-param callable(CallbackInput $callback): bool $callback
  • psalm-return Callback
public static PHPUnit\Framework\Assert :: classHasAttribute ( string $attributeName ) : PHPUnit\Framework\Constraint\ClassHasAttribute
public static PHPUnit\Framework\Assert :: classHasStaticAttribute ( string $attributeName ) : PHPUnit\Framework\Constraint\ClassHasStaticAttribute
public static PHPUnit\Framework\Assert :: containsEqual ( $value ) : PHPUnit\Framework\Constraint\TraversableContainsEqual
public static PHPUnit\Framework\Assert :: containsIdentical ( $value ) : PHPUnit\Framework\Constraint\TraversableContainsIdentical
public static PHPUnit\Framework\Assert :: containsOnly ( string $type ) : PHPUnit\Framework\Constraint\TraversableContainsOnly
public static PHPUnit\Framework\Assert :: containsOnlyInstancesOf ( string $className ) : PHPUnit\Framework\Constraint\TraversableContainsOnly
public static PHPUnit\Framework\Assert :: countOf ( int $count ) : PHPUnit\Framework\Constraint\Count
public static PHPUnit\Framework\Assert :: directoryExists () : PHPUnit\Framework\Constraint\DirectoryExists
public static PHPUnit\Framework\Assert :: equalTo ( $value ) : PHPUnit\Framework\Constraint\IsEqual
public static PHPUnit\Framework\Assert :: equalToCanonicalizing ( $value ) : PHPUnit\Framework\Constraint\IsEqualCanonicalizing
public static PHPUnit\Framework\Assert :: equalToIgnoringCase ( $value ) : PHPUnit\Framework\Constraint\IsEqualIgnoringCase
public static PHPUnit\Framework\Assert :: equalToWithDelta ( $value , float $delta ) : PHPUnit\Framework\Constraint\IsEqualWithDelta
public static PHPUnit\Framework\TestCase :: exactly ( int $count ) : PHPUnit\Framework\MockObject\Rule\InvokedCount
 

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

public static PHPUnit\Framework\Assert :: fail ( string $message = '' ) : void
 

Fails a test with the given message.

  • throws AssertionFailedError
  • psalm-return never-return
public static PHPUnit\Framework\Assert :: fileExists () : PHPUnit\Framework\Constraint\FileExists
public static PHPUnit\Framework\Assert :: getCount () : int
 

Return the current assertion count.

public static PHPUnit\Framework\Assert :: greaterThan ( $value ) : PHPUnit\Framework\Constraint\GreaterThan
public static PHPUnit\Framework\Assert :: greaterThanOrEqual ( $value ) : PHPUnit\Framework\Constraint\LogicalOr
public static PHPUnit\Framework\Assert :: identicalTo ( $value ) : PHPUnit\Framework\Constraint\IsIdentical
public static PHPUnit\Framework\Assert :: isEmpty () : PHPUnit\Framework\Constraint\IsEmpty
public static PHPUnit\Framework\Assert :: isFalse () : PHPUnit\Framework\Constraint\IsFalse
public static PHPUnit\Framework\Assert :: isFinite () : PHPUnit\Framework\Constraint\IsFinite
public static PHPUnit\Framework\Assert :: isInfinite () : PHPUnit\Framework\Constraint\IsInfinite
public static PHPUnit\Framework\Assert :: isInstanceOf ( string $className ) : PHPUnit\Framework\Constraint\IsInstanceOf
public static PHPUnit\Framework\Assert :: isJson () : PHPUnit\Framework\Constraint\IsJson
public static PHPUnit\Framework\Assert :: isNan () : PHPUnit\Framework\Constraint\IsNan
public static PHPUnit\Framework\Assert :: isNull () : PHPUnit\Framework\Constraint\IsNull
public static PHPUnit\Framework\Assert :: isReadable () : PHPUnit\Framework\Constraint\IsReadable
public static PHPUnit\Framework\Assert :: isTrue () : PHPUnit\Framework\Constraint\IsTrue
public static PHPUnit\Framework\Assert :: isType ( string $type ) : PHPUnit\Framework\Constraint\IsType
public static PHPUnit\Framework\Assert :: isWritable () : PHPUnit\Framework\Constraint\IsWritable
public static PHPUnit\Framework\Assert :: lessThan ( $value ) : PHPUnit\Framework\Constraint\LessThan
public static PHPUnit\Framework\Assert :: lessThanOrEqual ( $value ) : PHPUnit\Framework\Constraint\LogicalOr
public static PHPUnit\Framework\Assert :: logicalAnd () : PHPUnit\Framework\Constraint\LogicalAnd
public static PHPUnit\Framework\Assert :: logicalNot ( PHPUnit\Framework\Constraint\Constraint $constraint ) : PHPUnit\Framework\Constraint\LogicalNot
public static PHPUnit\Framework\Assert :: logicalOr () : PHPUnit\Framework\Constraint\LogicalOr
public static PHPUnit\Framework\Assert :: logicalXor () : PHPUnit\Framework\Constraint\LogicalXor
public static PHPUnit\Framework\Assert :: markTestIncomplete ( string $message = '' ) : void
 

Mark the test as incomplete.

  • throws IncompleteTestError
  • psalm-return never-return
public static PHPUnit\Framework\Assert :: markTestSkipped ( string $message = '' ) : void
 

Mark the test as skipped.

  • throws SkippedTestError
  • throws SyntheticSkippedError
  • psalm-return never-return
public static PHPUnit\Framework\Assert :: matches ( string $string ) : PHPUnit\Framework\Constraint\StringMatchesFormatDescription
public static PHPUnit\Framework\Assert :: matchesRegularExpression ( string $pattern ) : PHPUnit\Framework\Constraint\RegularExpression
public static PHPUnit\Framework\TestCase :: never () : PHPUnit\Framework\MockObject\Rule\InvokedCount
 

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

public static PHPUnit\Framework\Assert :: objectEquals ( object $object , string $method = 'equals' ) : PHPUnit\Framework\Constraint\ObjectEquals
public static PHPUnit\Framework\Assert :: objectHasAttribute ( $attributeName ) : PHPUnit\Framework\Constraint\ObjectHasAttribute
public static PHPUnit\Framework\TestCase :: once () : PHPUnit\Framework\MockObject\Rule\InvokedCount
 

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

public static PHPUnit\Framework\TestCase :: onConsecutiveCalls ( $args ) : PHPUnit\Framework\MockObject\Stub\ConsecutiveCalls
public static PHPUnit\Framework\Assert :: resetCount () : void
 

Reset the assertion counter.

public static PHPUnit\Framework\TestCase :: returnArgument ( int $argumentIndex ) : PHPUnit\Framework\MockObject\Stub\ReturnArgument
public static PHPUnit\Framework\TestCase :: returnCallback ( $callback ) : PHPUnit\Framework\MockObject\Stub\ReturnCallback
public static PHPUnit\Framework\TestCase :: returnSelf () : PHPUnit\Framework\MockObject\Stub\ReturnSelf
 

Returns the current object.

This method is useful when mocking a fluent interface.

public static PHPUnit\Framework\TestCase :: returnValue ( $value ) : PHPUnit\Framework\MockObject\Stub\ReturnStub
public static PHPUnit\Framework\TestCase :: returnValueMap ( array $valueMap ) : PHPUnit\Framework\MockObject\Stub\ReturnValueMap
public static setUpBeforeClass () : void
public static PHPUnit\Framework\Assert :: stringContains ( string $string , bool $case = true ) : PHPUnit\Framework\Constraint\StringContains
public static PHPUnit\Framework\Assert :: stringEndsWith ( string $suffix ) : PHPUnit\Framework\Constraint\StringEndsWith
public static PHPUnit\Framework\Assert :: stringStartsWith ( $prefix ) : PHPUnit\Framework\Constraint\StringStartsWith
public static PHPUnit\Framework\TestCase :: tearDownAfterClass () : void
 

This method is called after the last test of this test class is run.

public static PHPUnit\Framework\TestCase :: throwException ( Throwable $exception ) : PHPUnit\Framework\MockObject\Stub\Exception
© 2021 Bruce Wells
Search Namespaces \ Classes
Configuration