Documentation

Framework

Table of Contents

Namespaces

Attributes
Constraint
MockObject
TestSize
TestStatus

Interfaces

Test

Classes

Assert
TestCase

Functions

assertArrayHasKey()  : void
Asserts that an array has a specified key.
assertArrayNotHasKey()  : void
Asserts that an array does not have a specified key.
assertIsList()  : void
assertContains()  : void
Asserts that a haystack contains a needle.
assertContainsEquals()  : void
assertNotContains()  : void
Asserts that a haystack does not contain a needle.
assertNotContainsEquals()  : void
assertContainsOnly()  : void
Asserts that a haystack contains only values of a given type.
assertContainsOnlyInstancesOf()  : void
Asserts that a haystack contains only instances of a given class name.
assertNotContainsOnly()  : void
Asserts that a haystack does not contain only values of a given type.
assertCount()  : void
Asserts the number of elements of an array, Countable or Traversable.
assertNotCount()  : void
Asserts the number of elements of an array, Countable or Traversable.
assertEquals()  : void
Asserts that two variables are equal.
assertEqualsCanonicalizing()  : void
Asserts that two variables are equal (canonicalizing).
assertEqualsIgnoringCase()  : void
Asserts that two variables are equal (ignoring case).
assertEqualsWithDelta()  : void
Asserts that two variables are equal (with delta).
assertNotEquals()  : void
Asserts that two variables are not equal.
assertNotEqualsCanonicalizing()  : void
Asserts that two variables are not equal (canonicalizing).
assertNotEqualsIgnoringCase()  : void
Asserts that two variables are not equal (ignoring case).
assertNotEqualsWithDelta()  : void
Asserts that two variables are not equal (with delta).
assertObjectEquals()  : void
assertEmpty()  : void
Asserts that a variable is empty.
assertNotEmpty()  : void
Asserts that a variable is not empty.
assertGreaterThan()  : void
Asserts that a value is greater than another value.
assertGreaterThanOrEqual()  : void
Asserts that a value is greater than or equal to another value.
assertLessThan()  : void
Asserts that a value is smaller than another value.
assertLessThanOrEqual()  : void
Asserts that a value is smaller than or equal to another value.
assertFileEquals()  : void
Asserts that the contents of one file is equal to the contents of another file.
assertFileEqualsCanonicalizing()  : void
Asserts that the contents of one file is equal to the contents of another file (canonicalizing).
assertFileEqualsIgnoringCase()  : void
Asserts that the contents of one file is equal to the contents of another file (ignoring case).
assertFileNotEquals()  : void
Asserts that the contents of one file is not equal to the contents of another file.
assertFileNotEqualsCanonicalizing()  : void
Asserts that the contents of one file is not equal to the contents of another file (canonicalizing).
assertFileNotEqualsIgnoringCase()  : void
Asserts that the contents of one file is not equal to the contents of another file (ignoring case).
assertStringEqualsFile()  : void
Asserts that the contents of a string is equal to the contents of a file.
assertStringEqualsFileCanonicalizing()  : void
Asserts that the contents of a string is equal to the contents of a file (canonicalizing).
assertStringEqualsFileIgnoringCase()  : void
Asserts that the contents of a string is equal to the contents of a file (ignoring case).
assertStringNotEqualsFile()  : void
Asserts that the contents of a string is not equal to the contents of a file.
assertStringNotEqualsFileCanonicalizing()  : void
Asserts that the contents of a string is not equal to the contents of a file (canonicalizing).
assertStringNotEqualsFileIgnoringCase()  : void
Asserts that the contents of a string is not equal to the contents of a file (ignoring case).
assertIsReadable()  : void
Asserts that a file/dir is readable.
assertIsNotReadable()  : void
Asserts that a file/dir exists and is not readable.
assertIsWritable()  : void
Asserts that a file/dir exists and is writable.
assertIsNotWritable()  : void
Asserts that a file/dir exists and is not writable.
assertDirectoryExists()  : void
Asserts that a directory exists.
assertDirectoryDoesNotExist()  : void
Asserts that a directory does not exist.
assertDirectoryIsReadable()  : void
Asserts that a directory exists and is readable.
assertDirectoryIsNotReadable()  : void
Asserts that a directory exists and is not readable.
assertDirectoryIsWritable()  : void
Asserts that a directory exists and is writable.
assertDirectoryIsNotWritable()  : void
Asserts that a directory exists and is not writable.
assertFileExists()  : void
Asserts that a file exists.
assertFileDoesNotExist()  : void
Asserts that a file does not exist.
assertFileIsReadable()  : void
Asserts that a file exists and is readable.
assertFileIsNotReadable()  : void
Asserts that a file exists and is not readable.
assertFileIsWritable()  : void
Asserts that a file exists and is writable.
assertFileIsNotWritable()  : void
Asserts that a file exists and is not writable.
assertTrue()  : void
Asserts that a condition is true.
assertNotTrue()  : void
Asserts that a condition is not true.
assertFalse()  : void
Asserts that a condition is false.
assertNotFalse()  : void
Asserts that a condition is not false.
assertNull()  : void
Asserts that a variable is null.
assertNotNull()  : void
Asserts that a variable is not null.
assertFinite()  : void
Asserts that a variable is finite.
assertInfinite()  : void
Asserts that a variable is infinite.
assertNan()  : void
Asserts that a variable is nan.
assertObjectHasProperty()  : void
Asserts that an object has a specified property.
assertObjectNotHasProperty()  : void
Asserts that an object does not have a specified property.
assertSame()  : void
Asserts that two variables have the same type and value.
assertNotSame()  : void
Asserts that two variables do not have the same type and value.
assertInstanceOf()  : void
Asserts that a variable is of a given type.
assertNotInstanceOf()  : void
Asserts that a variable is not of a given type.
assertIsArray()  : void
Asserts that a variable is of type array.
assertIsBool()  : void
Asserts that a variable is of type bool.
assertIsFloat()  : void
Asserts that a variable is of type float.
assertIsInt()  : void
Asserts that a variable is of type int.
assertIsNumeric()  : void
Asserts that a variable is of type numeric.
assertIsObject()  : void
Asserts that a variable is of type object.
assertIsResource()  : void
Asserts that a variable is of type resource.
assertIsClosedResource()  : void
Asserts that a variable is of type resource and is closed.
assertIsString()  : void
Asserts that a variable is of type string.
assertIsScalar()  : void
Asserts that a variable is of type scalar.
assertIsCallable()  : void
Asserts that a variable is of type callable.
assertIsIterable()  : void
Asserts that a variable is of type iterable.
assertIsNotArray()  : void
Asserts that a variable is not of type array.
assertIsNotBool()  : void
Asserts that a variable is not of type bool.
assertIsNotFloat()  : void
Asserts that a variable is not of type float.
assertIsNotInt()  : void
Asserts that a variable is not of type int.
assertIsNotNumeric()  : void
Asserts that a variable is not of type numeric.
assertIsNotObject()  : void
Asserts that a variable is not of type object.
assertIsNotResource()  : void
Asserts that a variable is not of type resource.
assertIsNotClosedResource()  : void
Asserts that a variable is not of type resource.
assertIsNotString()  : void
Asserts that a variable is not of type string.
assertIsNotScalar()  : void
Asserts that a variable is not of type scalar.
assertIsNotCallable()  : void
Asserts that a variable is not of type callable.
assertIsNotIterable()  : void
Asserts that a variable is not of type iterable.
assertMatchesRegularExpression()  : void
Asserts that a string matches a given regular expression.
assertDoesNotMatchRegularExpression()  : void
Asserts that a string does not match a given regular expression.
assertSameSize()  : void
Assert that the size of two arrays (or `Countable` or `Traversable` objects) is the same.
assertNotSameSize()  : void
Assert that the size of two arrays (or `Countable` or `Traversable` objects) is not the same.
assertStringContainsStringIgnoringLineEndings()  : void
assertStringEqualsStringIgnoringLineEndings()  : void
Asserts that two strings are equal except for line endings.
assertFileMatchesFormat()  : void
Asserts that a string matches a given format string.
assertFileMatchesFormatFile()  : void
Asserts that a string matches a given format string.
assertStringMatchesFormat()  : void
Asserts that a string matches a given format string.
assertStringNotMatchesFormat()  : void
Asserts that a string does not match a given format string.
assertStringMatchesFormatFile()  : void
Asserts that a string matches a given format file.
assertStringNotMatchesFormatFile()  : void
Asserts that a string does not match a given format string.
assertStringStartsWith()  : void
Asserts that a string starts with a given prefix.
assertStringStartsNotWith()  : void
Asserts that a string starts not with a given prefix.
assertStringContainsString()  : void
assertStringContainsStringIgnoringCase()  : void
assertStringNotContainsString()  : void
assertStringNotContainsStringIgnoringCase()  : void
assertStringEndsWith()  : void
Asserts that a string ends with a given suffix.
assertStringEndsNotWith()  : void
Asserts that a string ends not with a given suffix.
assertXmlFileEqualsXmlFile()  : void
Asserts that two XML files are equal.
assertXmlFileNotEqualsXmlFile()  : void
Asserts that two XML files are not equal.
assertXmlStringEqualsXmlFile()  : void
Asserts that two XML documents are equal.
assertXmlStringNotEqualsXmlFile()  : void
Asserts that two XML documents are not equal.
assertXmlStringEqualsXmlString()  : void
Asserts that two XML documents are equal.
assertXmlStringNotEqualsXmlString()  : void
Asserts that two XML documents are not equal.
assertThat()  : void
Evaluates a PHPUnit\Framework\Constraint matcher object.
assertJson()  : void
Asserts that a string is a valid JSON string.
assertJsonStringEqualsJsonString()  : void
Asserts that two given JSON encoded objects or arrays are equal.
assertJsonStringNotEqualsJsonString()  : void
Asserts that two given JSON encoded objects or arrays are not equal.
assertJsonStringEqualsJsonFile()  : void
Asserts that the generated JSON encoded object and the content of the given file are equal.
assertJsonStringNotEqualsJsonFile()  : void
Asserts that the generated JSON encoded object and the content of the given file are not equal.
assertJsonFileEqualsJsonFile()  : void
Asserts that two JSON files are equal.
assertJsonFileNotEqualsJsonFile()  : void
Asserts that two JSON files are not equal.
logicalAnd()  : LogicalAnd
logicalOr()  : LogicalOr
logicalNot()  : LogicalNot
logicalXor()  : LogicalXor
anything()  : IsAnything
isTrue()  : IsTrue
isFalse()  : IsFalse
isJson()  : IsJson
isNull()  : IsNull
isFinite()  : IsFinite
isInfinite()  : IsInfinite
isNan()  : IsNan
containsEqual()  : TraversableContainsEqual
containsIdentical()  : TraversableContainsIdentical
containsOnly()  : TraversableContainsOnly
containsOnlyInstancesOf()  : TraversableContainsOnly
arrayHasKey()  : ArrayHasKey
isList()  : IsList
equalTo()  : IsEqual
equalToCanonicalizing()  : IsEqualCanonicalizing
equalToIgnoringCase()  : IsEqualIgnoringCase
equalToWithDelta()  : IsEqualWithDelta
isEmpty()  : IsEmpty
isWritable()  : IsWritable
isReadable()  : IsReadable
directoryExists()  : DirectoryExists
fileExists()  : FileExists
greaterThan()  : GreaterThan
greaterThanOrEqual()  : LogicalOr
identicalTo()  : IsIdentical
isInstanceOf()  : IsInstanceOf
isType()  : IsType
lessThan()  : LessThan
lessThanOrEqual()  : LogicalOr
matchesRegularExpression()  : RegularExpression
matches()  : StringMatchesFormatDescription
stringStartsWith()  : StringStartsWith
stringContains()  : StringContains
stringEndsWith()  : StringEndsWith
stringEqualsStringIgnoringLineEndings()  : StringEqualsStringIgnoringLineEndings
countOf()  : Count
objectEquals()  : ObjectEquals
callback()  : Callback
any()  : AnyInvokedCount
Returns a matcher that matches when the method is executed zero or more times.
never()  : InvokedCount
Returns a matcher that matches when the method is never executed.
atLeast()  : InvokedAtLeastCount
Returns a matcher that matches when the method is executed at least N times.
atLeastOnce()  : InvokedAtLeastOnce
Returns a matcher that matches when the method is executed at least once.
once()  : InvokedCount
Returns a matcher that matches when the method is executed exactly once.
exactly()  : InvokedCount
Returns a matcher that matches when the method is executed exactly $count times.
atMost()  : InvokedAtMostCount
Returns a matcher that matches when the method is executed at most N times.
returnValue()  : ReturnStub
returnValueMap()  : ReturnValueMap
returnArgument()  : ReturnArgument
returnCallback()  : ReturnCallback
returnSelf()  : ReturnSelf
Returns the current object.
throwException()  : Exception
onConsecutiveCalls()  : ConsecutiveCalls

Functions

assertArrayHasKey()

Asserts that an array has a specified key.

assertArrayHasKey(int|string $key, array<string|int, mixed>|ArrayAccess $array[, string $message = '' ]) : void
Parameters
$key : int|string
$array : array<string|int, mixed>|ArrayAccess
$message : string = ''
Tags
throws
Exception
throws
ExpectationFailedException
no-named-arguments

Parameter names are not covered by the backward compatibility promise for PHPUnit

see
Assert::assertArrayHasKey

assertArrayNotHasKey()

Asserts that an array does not have a specified key.

assertArrayNotHasKey(int|string $key, array<string|int, mixed>|ArrayAccess $array[, string $message = '' ]) : void
Parameters
$key : int|string
$array : array<string|int, mixed>|ArrayAccess
$message : string = ''
Tags
throws
Exception
throws
ExpectationFailedException
no-named-arguments

Parameter names are not covered by the backward compatibility promise for PHPUnit

see
Assert::assertArrayNotHasKey

assertIsList()

assertIsList(mixed $array[, string $message = '' ]) : void
Parameters
$array : mixed
$message : string = ''
Tags
throws
ExpectationFailedException
no-named-arguments

Parameter names are not covered by the backward compatibility promise for PHPUnit

see
Assert::assertIsList

assertContains()

Asserts that a haystack contains a needle.

assertContains(mixed $needle, iterable<string|int, mixed> $haystack[, string $message = '' ]) : void
Parameters
$needle : mixed
$haystack : iterable<string|int, mixed>
$message : string = ''
Tags
throws
Exception
throws
ExpectationFailedException
no-named-arguments

Parameter names are not covered by the backward compatibility promise for PHPUnit

see
Assert::assertContains

assertContainsEquals()

assertContainsEquals(mixed $needle, iterable<string|int, mixed> $haystack[, string $message = '' ]) : void
Parameters
$needle : mixed
$haystack : iterable<string|int, mixed>
$message : string = ''
Tags
throws
ExpectationFailedException
no-named-arguments

Parameter names are not covered by the backward compatibility promise for PHPUnit

see
Assert::assertContainsEquals

assertNotContains()

Asserts that a haystack does not contain a needle.

assertNotContains(mixed $needle, iterable<string|int, mixed> $haystack[, string $message = '' ]) : void
Parameters
$needle : mixed
$haystack : iterable<string|int, mixed>
$message : string = ''
Tags
throws
Exception
throws
ExpectationFailedException
no-named-arguments

Parameter names are not covered by the backward compatibility promise for PHPUnit

see
Assert::assertNotContains

assertNotContainsEquals()

assertNotContainsEquals(mixed $needle, iterable<string|int, mixed> $haystack[, string $message = '' ]) : void
Parameters
$needle : mixed
$haystack : iterable<string|int, mixed>
$message : string = ''
Tags
throws
ExpectationFailedException
no-named-arguments

Parameter names are not covered by the backward compatibility promise for PHPUnit

see
Assert::assertNotContainsEquals

assertContainsOnly()

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

assertContainsOnly(string $type, iterable<string|int, mixed> $haystack[, bool|null $isNativeType = null ][, string $message = '' ]) : void
Parameters
$type : string
$haystack : iterable<string|int, mixed>
$isNativeType : bool|null = null
$message : string = ''
Tags
throws
Exception
throws
ExpectationFailedException
no-named-arguments

Parameter names are not covered by the backward compatibility promise for PHPUnit

see
Assert::assertContainsOnly

assertContainsOnlyInstancesOf()

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

assertContainsOnlyInstancesOf(string $className, iterable<string|int, mixed> $haystack[, string $message = '' ]) : void
Parameters
$className : string
$haystack : iterable<string|int, mixed>
$message : string = ''
Tags
throws
Exception
throws
ExpectationFailedException
no-named-arguments

Parameter names are not covered by the backward compatibility promise for PHPUnit

see
Assert::assertContainsOnlyInstancesOf

assertNotContainsOnly()

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

assertNotContainsOnly(string $type, iterable<string|int, mixed> $haystack[, bool|null $isNativeType = null ][, string $message = '' ]) : void
Parameters
$type : string
$haystack : iterable<string|int, mixed>
$isNativeType : bool|null = null
$message : string = ''
Tags
throws
Exception
throws
ExpectationFailedException
no-named-arguments

Parameter names are not covered by the backward compatibility promise for PHPUnit

see
Assert::assertNotContainsOnly

assertCount()

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

assertCount(int $expectedCount, Countable|iterable<string|int, mixed> $haystack[, string $message = '' ]) : void
Parameters
$expectedCount : int
$haystack : Countable|iterable<string|int, mixed>
$message : string = ''
Tags
throws
Exception
throws
ExpectationFailedException
throws
GeneratorNotSupportedException
no-named-arguments

Parameter names are not covered by the backward compatibility promise for PHPUnit

see
Assert::assertCount

assertNotCount()

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

assertNotCount(int $expectedCount, Countable|iterable<string|int, mixed> $haystack[, string $message = '' ]) : void
Parameters
$expectedCount : int
$haystack : Countable|iterable<string|int, mixed>
$message : string = ''
Tags
throws
Exception
throws
ExpectationFailedException
throws
GeneratorNotSupportedException
no-named-arguments

Parameter names are not covered by the backward compatibility promise for PHPUnit

see
Assert::assertNotCount

assertEquals()

Asserts that two variables are equal.

assertEquals(mixed $expected, mixed $actual[, string $message = '' ]) : void
Parameters
$expected : mixed
$actual : mixed
$message : string = ''
Tags
throws
ExpectationFailedException
no-named-arguments

Parameter names are not covered by the backward compatibility promise for PHPUnit

see
Assert::assertEquals

assertEqualsCanonicalizing()

Asserts that two variables are equal (canonicalizing).

assertEqualsCanonicalizing(mixed $expected, mixed $actual[, string $message = '' ]) : void
Parameters
$expected : mixed
$actual : mixed
$message : string = ''
Tags
throws
ExpectationFailedException
no-named-arguments

Parameter names are not covered by the backward compatibility promise for PHPUnit

see
Assert::assertEqualsCanonicalizing

assertEqualsIgnoringCase()

Asserts that two variables are equal (ignoring case).

assertEqualsIgnoringCase(mixed $expected, mixed $actual[, string $message = '' ]) : void
Parameters
$expected : mixed
$actual : mixed
$message : string = ''
Tags
throws
ExpectationFailedException
no-named-arguments

Parameter names are not covered by the backward compatibility promise for PHPUnit

see
Assert::assertEqualsIgnoringCase

assertEqualsWithDelta()

Asserts that two variables are equal (with delta).

assertEqualsWithDelta(mixed $expected, mixed $actual, float $delta[, string $message = '' ]) : void
Parameters
$expected : mixed
$actual : mixed
$delta : float
$message : string = ''
Tags
throws
ExpectationFailedException
no-named-arguments

Parameter names are not covered by the backward compatibility promise for PHPUnit

see
Assert::assertEqualsWithDelta

assertNotEquals()

Asserts that two variables are not equal.

assertNotEquals(mixed $expected, mixed $actual[, string $message = '' ]) : void
Parameters
$expected : mixed
$actual : mixed
$message : string = ''
Tags
throws
ExpectationFailedException
no-named-arguments

Parameter names are not covered by the backward compatibility promise for PHPUnit

see
Assert::assertNotEquals

assertNotEqualsCanonicalizing()

Asserts that two variables are not equal (canonicalizing).

assertNotEqualsCanonicalizing(mixed $expected, mixed $actual[, string $message = '' ]) : void
Parameters
$expected : mixed
$actual : mixed
$message : string = ''
Tags
throws
ExpectationFailedException
no-named-arguments

Parameter names are not covered by the backward compatibility promise for PHPUnit

see
Assert::assertNotEqualsCanonicalizing

assertNotEqualsIgnoringCase()

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

assertNotEqualsIgnoringCase(mixed $expected, mixed $actual[, string $message = '' ]) : void
Parameters
$expected : mixed
$actual : mixed
$message : string = ''
Tags
throws
ExpectationFailedException
no-named-arguments

Parameter names are not covered by the backward compatibility promise for PHPUnit

see
Assert::assertNotEqualsIgnoringCase

assertNotEqualsWithDelta()

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

assertNotEqualsWithDelta(mixed $expected, mixed $actual, float $delta[, string $message = '' ]) : void
Parameters
$expected : mixed
$actual : mixed
$delta : float
$message : string = ''
Tags
throws
ExpectationFailedException
no-named-arguments

Parameter names are not covered by the backward compatibility promise for PHPUnit

see
Assert::assertNotEqualsWithDelta

assertObjectEquals()

assertObjectEquals(object $expected, object $actual[, string $method = 'equals' ][, string $message = '' ]) : void
Parameters
$expected : object
$actual : object
$method : string = 'equals'
$message : string = ''
Tags
throws
ExpectationFailedException
no-named-arguments

Parameter names are not covered by the backward compatibility promise for PHPUnit

see
Assert::assertObjectEquals

assertEmpty()

Asserts that a variable is empty.

assertEmpty(mixed $actual[, string $message = '' ]) : void
Parameters
$actual : mixed
$message : string = ''
Tags
throws
ExpectationFailedException
throws
GeneratorNotSupportedException
psalm-assert

empty $actual

no-named-arguments

Parameter names are not covered by the backward compatibility promise for PHPUnit

see
Assert::assertEmpty

assertNotEmpty()

Asserts that a variable is not empty.

assertNotEmpty(mixed $actual[, string $message = '' ]) : void
Parameters
$actual : mixed
$message : string = ''
Tags
throws
ExpectationFailedException
throws
GeneratorNotSupportedException
psalm-assert

!empty $actual

no-named-arguments

Parameter names are not covered by the backward compatibility promise for PHPUnit

see
Assert::assertNotEmpty

assertGreaterThan()

Asserts that a value is greater than another value.

assertGreaterThan(mixed $expected, mixed $actual[, string $message = '' ]) : void
Parameters
$expected : mixed
$actual : mixed
$message : string = ''
Tags
throws
ExpectationFailedException
no-named-arguments

Parameter names are not covered by the backward compatibility promise for PHPUnit

see
Assert::assertGreaterThan

assertGreaterThanOrEqual()

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

assertGreaterThanOrEqual(mixed $expected, mixed $actual[, string $message = '' ]) : void
Parameters
$expected : mixed
$actual : mixed
$message : string = ''
Tags
throws
ExpectationFailedException
no-named-arguments

Parameter names are not covered by the backward compatibility promise for PHPUnit

see
Assert::assertGreaterThanOrEqual

assertLessThan()

Asserts that a value is smaller than another value.

assertLessThan(mixed $expected, mixed $actual[, string $message = '' ]) : void
Parameters
$expected : mixed
$actual : mixed
$message : string = ''
Tags
throws
ExpectationFailedException
no-named-arguments

Parameter names are not covered by the backward compatibility promise for PHPUnit

see
Assert::assertLessThan

assertLessThanOrEqual()

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

assertLessThanOrEqual(mixed $expected, mixed $actual[, string $message = '' ]) : void
Parameters
$expected : mixed
$actual : mixed
$message : string = ''
Tags
throws
ExpectationFailedException
no-named-arguments

Parameter names are not covered by the backward compatibility promise for PHPUnit

see
Assert::assertLessThanOrEqual

assertFileEquals()

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

assertFileEquals(string $expected, string $actual[, string $message = '' ]) : void
Parameters
$expected : string
$actual : string
$message : string = ''
Tags
throws
ExpectationFailedException
no-named-arguments

Parameter names are not covered by the backward compatibility promise for PHPUnit

see
Assert::assertFileEquals

assertFileEqualsCanonicalizing()

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

assertFileEqualsCanonicalizing(string $expected, string $actual[, string $message = '' ]) : void
Parameters
$expected : string
$actual : string
$message : string = ''
Tags
throws
ExpectationFailedException
no-named-arguments

Parameter names are not covered by the backward compatibility promise for PHPUnit

see
Assert::assertFileEqualsCanonicalizing

assertFileEqualsIgnoringCase()

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

assertFileEqualsIgnoringCase(string $expected, string $actual[, string $message = '' ]) : void
Parameters
$expected : string
$actual : string
$message : string = ''
Tags
throws
ExpectationFailedException
no-named-arguments

Parameter names are not covered by the backward compatibility promise for PHPUnit

see
Assert::assertFileEqualsIgnoringCase

assertFileNotEquals()

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

assertFileNotEquals(string $expected, string $actual[, string $message = '' ]) : void
Parameters
$expected : string
$actual : string
$message : string = ''
Tags
throws
ExpectationFailedException
no-named-arguments

Parameter names are not covered by the backward compatibility promise for PHPUnit

see
Assert::assertFileNotEquals

assertFileNotEqualsCanonicalizing()

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

assertFileNotEqualsCanonicalizing(string $expected, string $actual[, string $message = '' ]) : void
Parameters
$expected : string
$actual : string
$message : string = ''
Tags
throws
ExpectationFailedException
no-named-arguments

Parameter names are not covered by the backward compatibility promise for PHPUnit

see
Assert::assertFileNotEqualsCanonicalizing

assertFileNotEqualsIgnoringCase()

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

assertFileNotEqualsIgnoringCase(string $expected, string $actual[, string $message = '' ]) : void
Parameters
$expected : string
$actual : string
$message : string = ''
Tags
throws
ExpectationFailedException
no-named-arguments

Parameter names are not covered by the backward compatibility promise for PHPUnit

see
Assert::assertFileNotEqualsIgnoringCase

assertStringEqualsFile()

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

assertStringEqualsFile(string $expectedFile, string $actualString[, string $message = '' ]) : void
Parameters
$expectedFile : string
$actualString : string
$message : string = ''
Tags
throws
ExpectationFailedException
no-named-arguments

Parameter names are not covered by the backward compatibility promise for PHPUnit

see
Assert::assertStringEqualsFile

assertStringEqualsFileCanonicalizing()

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

assertStringEqualsFileCanonicalizing(string $expectedFile, string $actualString[, string $message = '' ]) : void
Parameters
$expectedFile : string
$actualString : string
$message : string = ''
Tags
throws
ExpectationFailedException
no-named-arguments

Parameter names are not covered by the backward compatibility promise for PHPUnit

see
Assert::assertStringEqualsFileCanonicalizing

assertStringEqualsFileIgnoringCase()

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

assertStringEqualsFileIgnoringCase(string $expectedFile, string $actualString[, string $message = '' ]) : void
Parameters
$expectedFile : string
$actualString : string
$message : string = ''
Tags
throws
ExpectationFailedException
no-named-arguments

Parameter names are not covered by the backward compatibility promise for PHPUnit

see
Assert::assertStringEqualsFileIgnoringCase

assertStringNotEqualsFile()

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

assertStringNotEqualsFile(string $expectedFile, string $actualString[, string $message = '' ]) : void
Parameters
$expectedFile : string
$actualString : string
$message : string = ''
Tags
throws
ExpectationFailedException
no-named-arguments

Parameter names are not covered by the backward compatibility promise for PHPUnit

see
Assert::assertStringNotEqualsFile

assertStringNotEqualsFileCanonicalizing()

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

assertStringNotEqualsFileCanonicalizing(string $expectedFile, string $actualString[, string $message = '' ]) : void
Parameters
$expectedFile : string
$actualString : string
$message : string = ''
Tags
throws
ExpectationFailedException
no-named-arguments

Parameter names are not covered by the backward compatibility promise for PHPUnit

see
Assert::assertStringNotEqualsFileCanonicalizing

assertStringNotEqualsFileIgnoringCase()

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

assertStringNotEqualsFileIgnoringCase(string $expectedFile, string $actualString[, string $message = '' ]) : void
Parameters
$expectedFile : string
$actualString : string
$message : string = ''
Tags
throws
ExpectationFailedException
no-named-arguments

Parameter names are not covered by the backward compatibility promise for PHPUnit

see
Assert::assertStringNotEqualsFileIgnoringCase

assertIsReadable()

Asserts that a file/dir is readable.

assertIsReadable(string $filename[, string $message = '' ]) : void
Parameters
$filename : string
$message : string = ''
Tags
throws
ExpectationFailedException
no-named-arguments

Parameter names are not covered by the backward compatibility promise for PHPUnit

see
Assert::assertIsReadable

assertIsNotReadable()

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

assertIsNotReadable(string $filename[, string $message = '' ]) : void
Parameters
$filename : string
$message : string = ''
Tags
throws
ExpectationFailedException
no-named-arguments

Parameter names are not covered by the backward compatibility promise for PHPUnit

see
Assert::assertIsNotReadable

assertIsWritable()

Asserts that a file/dir exists and is writable.

assertIsWritable(string $filename[, string $message = '' ]) : void
Parameters
$filename : string
$message : string = ''
Tags
throws
ExpectationFailedException
no-named-arguments

Parameter names are not covered by the backward compatibility promise for PHPUnit

see
Assert::assertIsWritable

assertIsNotWritable()

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

assertIsNotWritable(string $filename[, string $message = '' ]) : void
Parameters
$filename : string
$message : string = ''
Tags
throws
ExpectationFailedException
no-named-arguments

Parameter names are not covered by the backward compatibility promise for PHPUnit

see
Assert::assertIsNotWritable

assertDirectoryExists()

Asserts that a directory exists.

assertDirectoryExists(string $directory[, string $message = '' ]) : void
Parameters
$directory : string
$message : string = ''
Tags
throws
ExpectationFailedException
no-named-arguments

Parameter names are not covered by the backward compatibility promise for PHPUnit

see
Assert::assertDirectoryExists

assertDirectoryDoesNotExist()

Asserts that a directory does not exist.

assertDirectoryDoesNotExist(string $directory[, string $message = '' ]) : void
Parameters
$directory : string
$message : string = ''
Tags
throws
ExpectationFailedException
no-named-arguments

Parameter names are not covered by the backward compatibility promise for PHPUnit

see
Assert::assertDirectoryDoesNotExist

assertDirectoryIsReadable()

Asserts that a directory exists and is readable.

assertDirectoryIsReadable(string $directory[, string $message = '' ]) : void
Parameters
$directory : string
$message : string = ''
Tags
throws
ExpectationFailedException
no-named-arguments

Parameter names are not covered by the backward compatibility promise for PHPUnit

see
Assert::assertDirectoryIsReadable

assertDirectoryIsNotReadable()

Asserts that a directory exists and is not readable.

assertDirectoryIsNotReadable(string $directory[, string $message = '' ]) : void
Parameters
$directory : string
$message : string = ''
Tags
throws
ExpectationFailedException
no-named-arguments

Parameter names are not covered by the backward compatibility promise for PHPUnit

see
Assert::assertDirectoryIsNotReadable

assertDirectoryIsWritable()

Asserts that a directory exists and is writable.

assertDirectoryIsWritable(string $directory[, string $message = '' ]) : void
Parameters
$directory : string
$message : string = ''
Tags
throws
ExpectationFailedException
no-named-arguments

Parameter names are not covered by the backward compatibility promise for PHPUnit

see
Assert::assertDirectoryIsWritable

assertDirectoryIsNotWritable()

Asserts that a directory exists and is not writable.

assertDirectoryIsNotWritable(string $directory[, string $message = '' ]) : void
Parameters
$directory : string
$message : string = ''
Tags
throws
ExpectationFailedException
no-named-arguments

Parameter names are not covered by the backward compatibility promise for PHPUnit

see
Assert::assertDirectoryIsNotWritable

assertFileExists()

Asserts that a file exists.

assertFileExists(string $filename[, string $message = '' ]) : void
Parameters
$filename : string
$message : string = ''
Tags
throws
ExpectationFailedException
no-named-arguments

Parameter names are not covered by the backward compatibility promise for PHPUnit

see
Assert::assertFileExists

assertFileDoesNotExist()

Asserts that a file does not exist.

assertFileDoesNotExist(string $filename[, string $message = '' ]) : void
Parameters
$filename : string
$message : string = ''
Tags
throws
ExpectationFailedException
no-named-arguments

Parameter names are not covered by the backward compatibility promise for PHPUnit

see
Assert::assertFileDoesNotExist

assertFileIsReadable()

Asserts that a file exists and is readable.

assertFileIsReadable(string $file[, string $message = '' ]) : void
Parameters
$file : string
$message : string = ''
Tags
throws
ExpectationFailedException
no-named-arguments

Parameter names are not covered by the backward compatibility promise for PHPUnit

see
Assert::assertFileIsReadable

assertFileIsNotReadable()

Asserts that a file exists and is not readable.

assertFileIsNotReadable(string $file[, string $message = '' ]) : void
Parameters
$file : string
$message : string = ''
Tags
throws
ExpectationFailedException
no-named-arguments

Parameter names are not covered by the backward compatibility promise for PHPUnit

see
Assert::assertFileIsNotReadable

assertFileIsWritable()

Asserts that a file exists and is writable.

assertFileIsWritable(string $file[, string $message = '' ]) : void
Parameters
$file : string
$message : string = ''
Tags
throws
ExpectationFailedException
no-named-arguments

Parameter names are not covered by the backward compatibility promise for PHPUnit

see
Assert::assertFileIsWritable

assertFileIsNotWritable()

Asserts that a file exists and is not writable.

assertFileIsNotWritable(string $file[, string $message = '' ]) : void
Parameters
$file : string
$message : string = ''
Tags
throws
ExpectationFailedException
no-named-arguments

Parameter names are not covered by the backward compatibility promise for PHPUnit

see
Assert::assertFileIsNotWritable

assertTrue()

Asserts that a condition is true.

assertTrue(mixed $condition[, string $message = '' ]) : void
Parameters
$condition : mixed
$message : string = ''
Tags
throws
ExpectationFailedException
psalm-assert

true $condition

no-named-arguments

Parameter names are not covered by the backward compatibility promise for PHPUnit

see
Assert::assertTrue

assertNotTrue()

Asserts that a condition is not true.

assertNotTrue(mixed $condition[, string $message = '' ]) : void
Parameters
$condition : mixed
$message : string = ''
Tags
throws
ExpectationFailedException
psalm-assert

!true $condition

no-named-arguments

Parameter names are not covered by the backward compatibility promise for PHPUnit

see
Assert::assertNotTrue

assertFalse()

Asserts that a condition is false.

assertFalse(mixed $condition[, string $message = '' ]) : void
Parameters
$condition : mixed
$message : string = ''
Tags
throws
ExpectationFailedException
psalm-assert

false $condition

no-named-arguments

Parameter names are not covered by the backward compatibility promise for PHPUnit

see
Assert::assertFalse

assertNotFalse()

Asserts that a condition is not false.

assertNotFalse(mixed $condition[, string $message = '' ]) : void
Parameters
$condition : mixed
$message : string = ''
Tags
throws
ExpectationFailedException
psalm-assert

!false $condition

no-named-arguments

Parameter names are not covered by the backward compatibility promise for PHPUnit

see
Assert::assertNotFalse

assertNull()

Asserts that a variable is null.

assertNull(mixed $actual[, string $message = '' ]) : void
Parameters
$actual : mixed
$message : string = ''
Tags
throws
ExpectationFailedException
psalm-assert

null $actual

no-named-arguments

Parameter names are not covered by the backward compatibility promise for PHPUnit

see
Assert::assertNull

assertNotNull()

Asserts that a variable is not null.

assertNotNull(mixed $actual[, string $message = '' ]) : void
Parameters
$actual : mixed
$message : string = ''
Tags
throws
ExpectationFailedException
psalm-assert

!null $actual

no-named-arguments

Parameter names are not covered by the backward compatibility promise for PHPUnit

see
Assert::assertNotNull

assertFinite()

Asserts that a variable is finite.

assertFinite(mixed $actual[, string $message = '' ]) : void
Parameters
$actual : mixed
$message : string = ''
Tags
throws
ExpectationFailedException
no-named-arguments

Parameter names are not covered by the backward compatibility promise for PHPUnit

see
Assert::assertFinite

assertInfinite()

Asserts that a variable is infinite.

assertInfinite(mixed $actual[, string $message = '' ]) : void
Parameters
$actual : mixed
$message : string = ''
Tags
throws
ExpectationFailedException
no-named-arguments

Parameter names are not covered by the backward compatibility promise for PHPUnit

see
Assert::assertInfinite

assertNan()

Asserts that a variable is nan.

assertNan(mixed $actual[, string $message = '' ]) : void
Parameters
$actual : mixed
$message : string = ''
Tags
throws
ExpectationFailedException
no-named-arguments

Parameter names are not covered by the backward compatibility promise for PHPUnit

see
Assert::assertNan

assertObjectHasProperty()

Asserts that an object has a specified property.

assertObjectHasProperty(string $propertyName, object $object[, string $message = '' ]) : void
Parameters
$propertyName : string
$object : object
$message : string = ''
Tags
throws
ExpectationFailedException
no-named-arguments

Parameter names are not covered by the backward compatibility promise for PHPUnit

see
Assert::assertObjectHasProperty

assertObjectNotHasProperty()

Asserts that an object does not have a specified property.

assertObjectNotHasProperty(string $propertyName, object $object[, string $message = '' ]) : void
Parameters
$propertyName : string
$object : object
$message : string = ''
Tags
throws
ExpectationFailedException
no-named-arguments

Parameter names are not covered by the backward compatibility promise for PHPUnit

see
Assert::assertObjectNotHasProperty

assertSame()

Asserts that two variables have the same type and value.

assertSame(mixed $expected, mixed $actual[, string $message = '' ]) : void

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

Parameters
$expected : mixed
$actual : mixed
$message : string = ''
Tags
throws
ExpectationFailedException
psalm-template

ExpectedType

psalm-param

ExpectedType $expected

psalm-assert

=ExpectedType $actual

no-named-arguments

Parameter names are not covered by the backward compatibility promise for PHPUnit

see
Assert::assertSame

assertNotSame()

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

assertNotSame(mixed $expected, mixed $actual[, string $message = '' ]) : void

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

Parameters
$expected : mixed
$actual : mixed
$message : string = ''
Tags
throws
ExpectationFailedException
no-named-arguments

Parameter names are not covered by the backward compatibility promise for PHPUnit

see
Assert::assertNotSame

assertInstanceOf()

Asserts that a variable is of a given type.

assertInstanceOf(string $expected, mixed $actual[, string $message = '' ]) : void
Parameters
$expected : string
$actual : mixed
$message : string = ''
Tags
throws
Exception
throws
ExpectationFailedException
throws
UnknownClassOrInterfaceException
psalm-template

ExpectedType of object

psalm-param

class-string<ExpectedType> $expected

psalm-assert

=ExpectedType $actual

no-named-arguments

Parameter names are not covered by the backward compatibility promise for PHPUnit

see
Assert::assertInstanceOf

assertNotInstanceOf()

Asserts that a variable is not of a given type.

assertNotInstanceOf(string $expected, mixed $actual[, string $message = '' ]) : void
Parameters
$expected : string
$actual : mixed
$message : string = ''
Tags
throws
Exception
throws
ExpectationFailedException
psalm-template

ExpectedType of object

psalm-param

class-string<ExpectedType> $expected

psalm-assert

!ExpectedType $actual

no-named-arguments

Parameter names are not covered by the backward compatibility promise for PHPUnit

see
Assert::assertNotInstanceOf

assertIsArray()

Asserts that a variable is of type array.

assertIsArray(mixed $actual[, string $message = '' ]) : void
Parameters
$actual : mixed
$message : string = ''
Tags
throws
Exception
throws
ExpectationFailedException
psalm-assert

array $actual

no-named-arguments

Parameter names are not covered by the backward compatibility promise for PHPUnit

see
Assert::assertIsArray

assertIsBool()

Asserts that a variable is of type bool.

assertIsBool(mixed $actual[, string $message = '' ]) : void
Parameters
$actual : mixed
$message : string = ''
Tags
throws
Exception
throws
ExpectationFailedException
psalm-assert

bool $actual

no-named-arguments

Parameter names are not covered by the backward compatibility promise for PHPUnit

see
Assert::assertIsBool

assertIsFloat()

Asserts that a variable is of type float.

assertIsFloat(mixed $actual[, string $message = '' ]) : void
Parameters
$actual : mixed
$message : string = ''
Tags
throws
Exception
throws
ExpectationFailedException
psalm-assert

float $actual

no-named-arguments

Parameter names are not covered by the backward compatibility promise for PHPUnit

see
Assert::assertIsFloat

assertIsInt()

Asserts that a variable is of type int.

assertIsInt(mixed $actual[, string $message = '' ]) : void
Parameters
$actual : mixed
$message : string = ''
Tags
throws
Exception
throws
ExpectationFailedException
psalm-assert

int $actual

no-named-arguments

Parameter names are not covered by the backward compatibility promise for PHPUnit

see
Assert::assertIsInt

assertIsNumeric()

Asserts that a variable is of type numeric.

assertIsNumeric(mixed $actual[, string $message = '' ]) : void
Parameters
$actual : mixed
$message : string = ''
Tags
throws
Exception
throws
ExpectationFailedException
psalm-assert

numeric $actual

no-named-arguments

Parameter names are not covered by the backward compatibility promise for PHPUnit

see
Assert::assertIsNumeric

assertIsObject()

Asserts that a variable is of type object.

assertIsObject(mixed $actual[, string $message = '' ]) : void
Parameters
$actual : mixed
$message : string = ''
Tags
throws
Exception
throws
ExpectationFailedException
psalm-assert

object $actual

no-named-arguments

Parameter names are not covered by the backward compatibility promise for PHPUnit

see
Assert::assertIsObject

assertIsResource()

Asserts that a variable is of type resource.

assertIsResource(mixed $actual[, string $message = '' ]) : void
Parameters
$actual : mixed
$message : string = ''
Tags
throws
Exception
throws
ExpectationFailedException
psalm-assert

resource $actual

no-named-arguments

Parameter names are not covered by the backward compatibility promise for PHPUnit

see
Assert::assertIsResource

assertIsClosedResource()

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

assertIsClosedResource(mixed $actual[, string $message = '' ]) : void
Parameters
$actual : mixed
$message : string = ''
Tags
throws
Exception
throws
ExpectationFailedException
psalm-assert

resource $actual

no-named-arguments

Parameter names are not covered by the backward compatibility promise for PHPUnit

see
Assert::assertIsClosedResource

assertIsString()

Asserts that a variable is of type string.

assertIsString(mixed $actual[, string $message = '' ]) : void
Parameters
$actual : mixed
$message : string = ''
Tags
throws
Exception
throws
ExpectationFailedException
psalm-assert

string $actual

no-named-arguments

Parameter names are not covered by the backward compatibility promise for PHPUnit

see
Assert::assertIsString

assertIsScalar()

Asserts that a variable is of type scalar.

assertIsScalar(mixed $actual[, string $message = '' ]) : void
Parameters
$actual : mixed
$message : string = ''
Tags
throws
Exception
throws
ExpectationFailedException
psalm-assert

scalar $actual

no-named-arguments

Parameter names are not covered by the backward compatibility promise for PHPUnit

see
Assert::assertIsScalar

assertIsCallable()

Asserts that a variable is of type callable.

assertIsCallable(mixed $actual[, string $message = '' ]) : void
Parameters
$actual : mixed
$message : string = ''
Tags
throws
Exception
throws
ExpectationFailedException
psalm-assert

callable $actual

no-named-arguments

Parameter names are not covered by the backward compatibility promise for PHPUnit

see
Assert::assertIsCallable

assertIsIterable()

Asserts that a variable is of type iterable.

assertIsIterable(mixed $actual[, string $message = '' ]) : void
Parameters
$actual : mixed
$message : string = ''
Tags
throws
Exception
throws
ExpectationFailedException
psalm-assert

iterable $actual

no-named-arguments

Parameter names are not covered by the backward compatibility promise for PHPUnit

see
Assert::assertIsIterable

assertIsNotArray()

Asserts that a variable is not of type array.

assertIsNotArray(mixed $actual[, string $message = '' ]) : void
Parameters
$actual : mixed
$message : string = ''
Tags
throws
Exception
throws
ExpectationFailedException
psalm-assert

!array $actual

no-named-arguments

Parameter names are not covered by the backward compatibility promise for PHPUnit

see
Assert::assertIsNotArray

assertIsNotBool()

Asserts that a variable is not of type bool.

assertIsNotBool(mixed $actual[, string $message = '' ]) : void
Parameters
$actual : mixed
$message : string = ''
Tags
throws
Exception
throws
ExpectationFailedException
psalm-assert

!bool $actual

no-named-arguments

Parameter names are not covered by the backward compatibility promise for PHPUnit

see
Assert::assertIsNotBool

assertIsNotFloat()

Asserts that a variable is not of type float.

assertIsNotFloat(mixed $actual[, string $message = '' ]) : void
Parameters
$actual : mixed
$message : string = ''
Tags
throws
Exception
throws
ExpectationFailedException
psalm-assert

!float $actual

no-named-arguments

Parameter names are not covered by the backward compatibility promise for PHPUnit

see
Assert::assertIsNotFloat

assertIsNotInt()

Asserts that a variable is not of type int.

assertIsNotInt(mixed $actual[, string $message = '' ]) : void
Parameters
$actual : mixed
$message : string = ''
Tags
throws
Exception
throws
ExpectationFailedException
psalm-assert

!int $actual

no-named-arguments

Parameter names are not covered by the backward compatibility promise for PHPUnit

see
Assert::assertIsNotInt

assertIsNotNumeric()

Asserts that a variable is not of type numeric.

assertIsNotNumeric(mixed $actual[, string $message = '' ]) : void
Parameters
$actual : mixed
$message : string = ''
Tags
throws
Exception
throws
ExpectationFailedException
psalm-assert

!numeric $actual

no-named-arguments

Parameter names are not covered by the backward compatibility promise for PHPUnit

see
Assert::assertIsNotNumeric

assertIsNotObject()

Asserts that a variable is not of type object.

assertIsNotObject(mixed $actual[, string $message = '' ]) : void
Parameters
$actual : mixed
$message : string = ''
Tags
throws
Exception
throws
ExpectationFailedException
psalm-assert

!object $actual

no-named-arguments

Parameter names are not covered by the backward compatibility promise for PHPUnit

see
Assert::assertIsNotObject

assertIsNotResource()

Asserts that a variable is not of type resource.

assertIsNotResource(mixed $actual[, string $message = '' ]) : void
Parameters
$actual : mixed
$message : string = ''
Tags
throws
Exception
throws
ExpectationFailedException
psalm-assert

!resource $actual

no-named-arguments

Parameter names are not covered by the backward compatibility promise for PHPUnit

see
Assert::assertIsNotResource

assertIsNotClosedResource()

Asserts that a variable is not of type resource.

assertIsNotClosedResource(mixed $actual[, string $message = '' ]) : void
Parameters
$actual : mixed
$message : string = ''
Tags
throws
Exception
throws
ExpectationFailedException
psalm-assert

!resource $actual

no-named-arguments

Parameter names are not covered by the backward compatibility promise for PHPUnit

see
Assert::assertIsNotClosedResource

assertIsNotString()

Asserts that a variable is not of type string.

assertIsNotString(mixed $actual[, string $message = '' ]) : void
Parameters
$actual : mixed
$message : string = ''
Tags
throws
Exception
throws
ExpectationFailedException
psalm-assert

!string $actual

no-named-arguments

Parameter names are not covered by the backward compatibility promise for PHPUnit

see
Assert::assertIsNotString

assertIsNotScalar()

Asserts that a variable is not of type scalar.

assertIsNotScalar(mixed $actual[, string $message = '' ]) : void
Parameters
$actual : mixed
$message : string = ''
Tags
throws
Exception
throws
ExpectationFailedException
psalm-assert

!scalar $actual

no-named-arguments

Parameter names are not covered by the backward compatibility promise for PHPUnit

see
Assert::assertIsNotScalar

assertIsNotCallable()

Asserts that a variable is not of type callable.

assertIsNotCallable(mixed $actual[, string $message = '' ]) : void
Parameters
$actual : mixed
$message : string = ''
Tags
throws
Exception
throws
ExpectationFailedException
psalm-assert

!callable $actual

no-named-arguments

Parameter names are not covered by the backward compatibility promise for PHPUnit

see
Assert::assertIsNotCallable

assertIsNotIterable()

Asserts that a variable is not of type iterable.

assertIsNotIterable(mixed $actual[, string $message = '' ]) : void
Parameters
$actual : mixed
$message : string = ''
Tags
throws
Exception
throws
ExpectationFailedException
psalm-assert

!iterable $actual

no-named-arguments

Parameter names are not covered by the backward compatibility promise for PHPUnit

see
Assert::assertIsNotIterable

assertMatchesRegularExpression()

Asserts that a string matches a given regular expression.

assertMatchesRegularExpression(string $pattern, string $string[, string $message = '' ]) : void
Parameters
$pattern : string
$string : string
$message : string = ''
Tags
throws
ExpectationFailedException
no-named-arguments

Parameter names are not covered by the backward compatibility promise for PHPUnit

see
Assert::assertMatchesRegularExpression

assertDoesNotMatchRegularExpression()

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

assertDoesNotMatchRegularExpression(string $pattern, string $string[, string $message = '' ]) : void
Parameters
$pattern : string
$string : string
$message : string = ''
Tags
throws
ExpectationFailedException
no-named-arguments

Parameter names are not covered by the backward compatibility promise for PHPUnit

see
Assert::assertDoesNotMatchRegularExpression

assertSameSize()

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

assertSameSize(Countable|iterable<string|int, mixed> $expected, Countable|iterable<string|int, mixed> $actual[, string $message = '' ]) : void
Parameters
$expected : Countable|iterable<string|int, mixed>
$actual : Countable|iterable<string|int, mixed>
$message : string = ''
Tags
throws
Exception
throws
ExpectationFailedException
throws
GeneratorNotSupportedException
no-named-arguments

Parameter names are not covered by the backward compatibility promise for PHPUnit

see
Assert::assertSameSize

assertNotSameSize()

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

assertNotSameSize(Countable|iterable<string|int, mixed> $expected, Countable|iterable<string|int, mixed> $actual[, string $message = '' ]) : void
Parameters
$expected : Countable|iterable<string|int, mixed>
$actual : Countable|iterable<string|int, mixed>
$message : string = ''
Tags
throws
Exception
throws
ExpectationFailedException
throws
GeneratorNotSupportedException
no-named-arguments

Parameter names are not covered by the backward compatibility promise for PHPUnit

see
Assert::assertNotSameSize

assertStringContainsStringIgnoringLineEndings()

assertStringContainsStringIgnoringLineEndings(string $needle, string $haystack[, string $message = '' ]) : void
Parameters
$needle : string
$haystack : string
$message : string = ''
Tags
throws
ExpectationFailedException
no-named-arguments

Parameter names are not covered by the backward compatibility promise for PHPUnit

see
Assert::assertStringContainsStringIgnoringLineEndings

assertStringEqualsStringIgnoringLineEndings()

Asserts that two strings are equal except for line endings.

assertStringEqualsStringIgnoringLineEndings(string $expected, string $actual[, string $message = '' ]) : void
Parameters
$expected : string
$actual : string
$message : string = ''
Tags
throws
ExpectationFailedException
no-named-arguments

Parameter names are not covered by the backward compatibility promise for PHPUnit

see
Assert::assertStringEqualsStringIgnoringLineEndings

assertFileMatchesFormat()

Asserts that a string matches a given format string.

assertFileMatchesFormat(string $format, string $actualFile[, string $message = '' ]) : void
Parameters
$format : string
$actualFile : string
$message : string = ''
Tags
throws
ExpectationFailedException
no-named-arguments

Parameter names are not covered by the backward compatibility promise for PHPUnit

see
Assert::assertFileMatchesFormat

assertFileMatchesFormatFile()

Asserts that a string matches a given format string.

assertFileMatchesFormatFile(string $formatFile, string $actualFile[, string $message = '' ]) : void
Parameters
$formatFile : string
$actualFile : string
$message : string = ''
Tags
throws
ExpectationFailedException
no-named-arguments

Parameter names are not covered by the backward compatibility promise for PHPUnit

see
Assert::assertFileMatchesFormatFile

assertStringMatchesFormat()

Asserts that a string matches a given format string.

assertStringMatchesFormat(string $format, string $string[, string $message = '' ]) : void
Parameters
$format : string
$string : string
$message : string = ''
Tags
throws
ExpectationFailedException
no-named-arguments

Parameter names are not covered by the backward compatibility promise for PHPUnit

see
Assert::assertStringMatchesFormat

assertStringNotMatchesFormat()

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

assertStringNotMatchesFormat(string $format, string $string[, string $message = '' ]) : void
Parameters
$format : string
$string : string
$message : string = ''
Tags
throws
ExpectationFailedException
deprecated

https://github.com/sebastianbergmann/phpunit/issues/5472

no-named-arguments

Parameter names are not covered by the backward compatibility promise for PHPUnit

see
Assert::assertStringNotMatchesFormat

assertStringMatchesFormatFile()

Asserts that a string matches a given format file.

assertStringMatchesFormatFile(string $formatFile, string $string[, string $message = '' ]) : void
Parameters
$formatFile : string
$string : string
$message : string = ''
Tags
throws
ExpectationFailedException
no-named-arguments

Parameter names are not covered by the backward compatibility promise for PHPUnit

see
Assert::assertStringMatchesFormatFile

assertStringNotMatchesFormatFile()

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

assertStringNotMatchesFormatFile(string $formatFile, string $string[, string $message = '' ]) : void
Parameters
$formatFile : string
$string : string
$message : string = ''
Tags
throws
ExpectationFailedException
deprecated

https://github.com/sebastianbergmann/phpunit/issues/5472

no-named-arguments

Parameter names are not covered by the backward compatibility promise for PHPUnit

see
Assert::assertStringNotMatchesFormatFile

assertStringStartsWith()

Asserts that a string starts with a given prefix.

assertStringStartsWith(string $prefix, string $string[, string $message = '' ]) : void
Parameters
$prefix : string
$string : string
$message : string = ''
Tags
psalm-param

non-empty-string $prefix

throws
ExpectationFailedException
throws
InvalidArgumentException
no-named-arguments

Parameter names are not covered by the backward compatibility promise for PHPUnit

see
Assert::assertStringStartsWith

assertStringStartsNotWith()

Asserts that a string starts not with a given prefix.

assertStringStartsNotWith(string $prefix, string $string[, string $message = '' ]) : void
Parameters
$prefix : string
$string : string
$message : string = ''
Tags
psalm-param

non-empty-string $prefix

throws
ExpectationFailedException
throws
InvalidArgumentException
no-named-arguments

Parameter names are not covered by the backward compatibility promise for PHPUnit

see
Assert::assertStringStartsNotWith

assertStringContainsString()

assertStringContainsString(string $needle, string $haystack[, string $message = '' ]) : void
Parameters
$needle : string
$haystack : string
$message : string = ''
Tags
throws
ExpectationFailedException
no-named-arguments

Parameter names are not covered by the backward compatibility promise for PHPUnit

see
Assert::assertStringContainsString

assertStringContainsStringIgnoringCase()

assertStringContainsStringIgnoringCase(string $needle, string $haystack[, string $message = '' ]) : void
Parameters
$needle : string
$haystack : string
$message : string = ''
Tags
throws
ExpectationFailedException
no-named-arguments

Parameter names are not covered by the backward compatibility promise for PHPUnit

see
Assert::assertStringContainsStringIgnoringCase

assertStringNotContainsString()

assertStringNotContainsString(string $needle, string $haystack[, string $message = '' ]) : void
Parameters
$needle : string
$haystack : string
$message : string = ''
Tags
throws
ExpectationFailedException
no-named-arguments

Parameter names are not covered by the backward compatibility promise for PHPUnit

see
Assert::assertStringNotContainsString

assertStringNotContainsStringIgnoringCase()

assertStringNotContainsStringIgnoringCase(string $needle, string $haystack[, string $message = '' ]) : void
Parameters
$needle : string
$haystack : string
$message : string = ''
Tags
throws
ExpectationFailedException
no-named-arguments

Parameter names are not covered by the backward compatibility promise for PHPUnit

see
Assert::assertStringNotContainsStringIgnoringCase

assertStringEndsWith()

Asserts that a string ends with a given suffix.

assertStringEndsWith(string $suffix, string $string[, string $message = '' ]) : void
Parameters
$suffix : string
$string : string
$message : string = ''
Tags
psalm-param

non-empty-string $suffix

throws
ExpectationFailedException
throws
InvalidArgumentException
no-named-arguments

Parameter names are not covered by the backward compatibility promise for PHPUnit

see
Assert::assertStringEndsWith

assertStringEndsNotWith()

Asserts that a string ends not with a given suffix.

assertStringEndsNotWith(string $suffix, string $string[, string $message = '' ]) : void
Parameters
$suffix : string
$string : string
$message : string = ''
Tags
psalm-param

non-empty-string $suffix

throws
ExpectationFailedException
throws
InvalidArgumentException
no-named-arguments

Parameter names are not covered by the backward compatibility promise for PHPUnit

see
Assert::assertStringEndsNotWith

assertXmlFileEqualsXmlFile()

Asserts that two XML files are equal.

assertXmlFileEqualsXmlFile(string $expectedFile, string $actualFile[, string $message = '' ]) : void
Parameters
$expectedFile : string
$actualFile : string
$message : string = ''
Tags
throws
Exception
throws
ExpectationFailedException
throws
XmlException
no-named-arguments

Parameter names are not covered by the backward compatibility promise for PHPUnit

see
Assert::assertXmlFileEqualsXmlFile

assertXmlFileNotEqualsXmlFile()

Asserts that two XML files are not equal.

assertXmlFileNotEqualsXmlFile(string $expectedFile, string $actualFile[, string $message = '' ]) : void
Parameters
$expectedFile : string
$actualFile : string
$message : string = ''
Tags
throws
Exception
throws
ExpectationFailedException
no-named-arguments

Parameter names are not covered by the backward compatibility promise for PHPUnit

see
Assert::assertXmlFileNotEqualsXmlFile

assertXmlStringEqualsXmlFile()

Asserts that two XML documents are equal.

assertXmlStringEqualsXmlFile(string $expectedFile, string $actualXml[, string $message = '' ]) : void
Parameters
$expectedFile : string
$actualXml : string
$message : string = ''
Tags
throws
ExpectationFailedException
throws
XmlException
no-named-arguments

Parameter names are not covered by the backward compatibility promise for PHPUnit

see
Assert::assertXmlStringEqualsXmlFile

assertXmlStringNotEqualsXmlFile()

Asserts that two XML documents are not equal.

assertXmlStringNotEqualsXmlFile(string $expectedFile, string $actualXml[, string $message = '' ]) : void
Parameters
$expectedFile : string
$actualXml : string
$message : string = ''
Tags
throws
ExpectationFailedException
throws
XmlException
no-named-arguments

Parameter names are not covered by the backward compatibility promise for PHPUnit

see
Assert::assertXmlStringNotEqualsXmlFile

assertXmlStringEqualsXmlString()

Asserts that two XML documents are equal.

assertXmlStringEqualsXmlString(string $expectedXml, string $actualXml[, string $message = '' ]) : void
Parameters
$expectedXml : string
$actualXml : string
$message : string = ''
Tags
throws
ExpectationFailedException
throws
XmlException
no-named-arguments

Parameter names are not covered by the backward compatibility promise for PHPUnit

see
Assert::assertXmlStringEqualsXmlString

assertXmlStringNotEqualsXmlString()

Asserts that two XML documents are not equal.

assertXmlStringNotEqualsXmlString(string $expectedXml, string $actualXml[, string $message = '' ]) : void
Parameters
$expectedXml : string
$actualXml : string
$message : string = ''
Tags
throws
ExpectationFailedException
throws
XmlException
no-named-arguments

Parameter names are not covered by the backward compatibility promise for PHPUnit

see
Assert::assertXmlStringNotEqualsXmlString

assertThat()

Evaluates a PHPUnit\Framework\Constraint matcher object.

assertThat(mixed $value, Constraint $constraint[, string $message = '' ]) : void
Parameters
$value : mixed
$constraint : Constraint
$message : string = ''
Tags
throws
ExpectationFailedException
no-named-arguments

Parameter names are not covered by the backward compatibility promise for PHPUnit

see
Assert::assertThat

assertJson()

Asserts that a string is a valid JSON string.

assertJson(string $actual[, string $message = '' ]) : void
Parameters
$actual : string
$message : string = ''
Tags
throws
ExpectationFailedException
no-named-arguments

Parameter names are not covered by the backward compatibility promise for PHPUnit

see
Assert::assertJson

assertJsonStringEqualsJsonString()

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

assertJsonStringEqualsJsonString(string $expectedJson, string $actualJson[, string $message = '' ]) : void
Parameters
$expectedJson : string
$actualJson : string
$message : string = ''
Tags
throws
ExpectationFailedException
no-named-arguments

Parameter names are not covered by the backward compatibility promise for PHPUnit

see
Assert::assertJsonStringEqualsJsonString

assertJsonStringNotEqualsJsonString()

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

assertJsonStringNotEqualsJsonString(string $expectedJson, string $actualJson[, string $message = '' ]) : void
Parameters
$expectedJson : string
$actualJson : string
$message : string = ''
Tags
throws
ExpectationFailedException
no-named-arguments

Parameter names are not covered by the backward compatibility promise for PHPUnit

see
Assert::assertJsonStringNotEqualsJsonString

assertJsonStringEqualsJsonFile()

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

assertJsonStringEqualsJsonFile(string $expectedFile, string $actualJson[, string $message = '' ]) : void
Parameters
$expectedFile : string
$actualJson : string
$message : string = ''
Tags
throws
ExpectationFailedException
no-named-arguments

Parameter names are not covered by the backward compatibility promise for PHPUnit

see
Assert::assertJsonStringEqualsJsonFile

assertJsonStringNotEqualsJsonFile()

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

assertJsonStringNotEqualsJsonFile(string $expectedFile, string $actualJson[, string $message = '' ]) : void
Parameters
$expectedFile : string
$actualJson : string
$message : string = ''
Tags
throws
ExpectationFailedException
no-named-arguments

Parameter names are not covered by the backward compatibility promise for PHPUnit

see
Assert::assertJsonStringNotEqualsJsonFile

assertJsonFileEqualsJsonFile()

Asserts that two JSON files are equal.

assertJsonFileEqualsJsonFile(string $expectedFile, string $actualFile[, string $message = '' ]) : void
Parameters
$expectedFile : string
$actualFile : string
$message : string = ''
Tags
throws
ExpectationFailedException
no-named-arguments

Parameter names are not covered by the backward compatibility promise for PHPUnit

see
Assert::assertJsonFileEqualsJsonFile

assertJsonFileNotEqualsJsonFile()

Asserts that two JSON files are not equal.

assertJsonFileNotEqualsJsonFile(string $expectedFile, string $actualFile[, string $message = '' ]) : void
Parameters
$expectedFile : string
$actualFile : string
$message : string = ''
Tags
throws
ExpectationFailedException
no-named-arguments

Parameter names are not covered by the backward compatibility promise for PHPUnit

see
Assert::assertJsonFileNotEqualsJsonFile

objectEquals()

objectEquals(object $object[, string $method = 'equals' ]) : ObjectEquals
Parameters
$object : object
$method : string = 'equals'
Return values
ObjectEquals

callback()

callback(callable $callback) : Callback
Parameters
$callback : callable
Tags
psalm-template

CallbackInput of mixed

psalm-param

callable(CallbackInput $callback): bool $callback

psalm-return

Callback<CallbackInput>

Return values
Callback

any()

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

any() : AnyInvokedCount
Return values
AnyInvokedCount

never()

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

never() : InvokedCount
Return values
InvokedCount

atLeast()

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

atLeast(int $requiredInvocations) : InvokedAtLeastCount
Parameters
$requiredInvocations : int
Return values
InvokedAtLeastCount

atLeastOnce()

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

atLeastOnce() : InvokedAtLeastOnce
Return values
InvokedAtLeastOnce

once()

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

once() : InvokedCount
Return values
InvokedCount

exactly()

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

exactly(int $count) : InvokedCount
Parameters
$count : int
Return values
InvokedCount

atMost()

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

atMost(int $allowedInvocations) : InvokedAtMostCount
Parameters
$allowedInvocations : int
Return values
InvokedAtMostCount

returnValue()

returnValue(mixed $value) : ReturnStub
Parameters
$value : mixed
Return values
ReturnStub

returnValueMap()

returnValueMap(array<string|int, mixed> $valueMap) : ReturnValueMap
Parameters
$valueMap : array<string|int, mixed>
Return values
ReturnValueMap

returnArgument()

returnArgument(int $argumentIndex) : ReturnArgument
Parameters
$argumentIndex : int
Return values
ReturnArgument

returnCallback()

returnCallback(callable $callback) : ReturnCallback
Parameters
$callback : callable
Return values
ReturnCallback

returnSelf()

Returns the current object.

returnSelf() : ReturnSelf

This method is useful when mocking a fluent interface.

Return values
ReturnSelf

throwException()

throwException(Throwable $exception) : Exception
Parameters
$exception : Throwable
Return values
Exception

onConsecutiveCalls()

onConsecutiveCalls() : ConsecutiveCalls
Return values
ConsecutiveCalls

        
On this page

Search results