Framework
Namespaces
Interfaces, Classes, Traits and Enums
- Test
- TestListener
- This interface, as well as the associated mechanism for extending PHPUnit, will be removed in PHPUnit 10. There is no alternative available in this version of PHPUnit.
- Assert
- TestCase
- TestListenerDefaultImplementation
Table of Contents
- assertArrayHasKey() : void
- Asserts that an array has a specified key.
- assertArrayNotHasKey() : void
- Asserts that an array does not have a specified key.
- 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.
- assertNotIsReadable() : 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.
- assertNotIsWritable() : 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.
- assertDirectoryNotExists() : 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.
- assertDirectoryNotIsReadable() : 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.
- assertDirectoryNotIsWritable() : 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.
- assertFileNotExists() : 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.
- assertFileNotIsReadable() : 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.
- assertFileNotIsWritable() : 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.
- assertClassHasAttribute() : void
- Asserts that a class has a specified attribute.
- assertClassNotHasAttribute() : void
- Asserts that a class does not have a specified attribute.
- assertClassHasStaticAttribute() : void
- Asserts that a class has a specified static attribute.
- assertClassNotHasStaticAttribute() : void
- Asserts that a class does not have a specified static attribute.
- assertObjectHasAttribute() : void
- Asserts that an object has a specified attribute.
- assertObjectNotHasAttribute() : void
- Asserts that an object does not have a specified attribute.
- 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.
- assertRegExp() : void
- Asserts that a string matches a given regular expression.
- assertDoesNotMatchRegularExpression() : void
- Asserts that a string does not match a given regular expression.
- assertNotRegExp() : 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.
- 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.
- assertEqualXMLStructure() : void
- Asserts that a hierarchy of DOMElements matches.
- 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
- callback() : Callback
- isFalse() : IsFalse
- isJson() : IsJson
- isNull() : IsNull
- isFinite() : IsFinite
- isInfinite() : IsInfinite
- isNan() : IsNan
- containsEqual() : TraversableContainsEqual
- containsIdentical() : TraversableContainsIdentical
- containsOnly() : TraversableContainsOnly
- containsOnlyInstancesOf() : TraversableContainsOnly
- arrayHasKey() : ArrayHasKey
- equalTo() : IsEqual
- equalToCanonicalizing() : IsEqualCanonicalizing
- equalToIgnoringCase() : IsEqualIgnoringCase
- equalToWithDelta() : IsEqualWithDelta
- isEmpty() : IsEmpty
- isWritable() : IsWritable
- isReadable() : IsReadable
- directoryExists() : DirectoryExists
- fileExists() : FileExists
- greaterThan() : GreaterThan
- greaterThanOrEqual() : LogicalOr
- classHasAttribute() : ClassHasAttribute
- classHasStaticAttribute() : ClassHasStaticAttribute
- objectHasAttribute() : ObjectHasAttribute
- identicalTo() : IsIdentical
- isInstanceOf() : IsInstanceOf
- isType() : IsType
- lessThan() : LessThan
- lessThanOrEqual() : LogicalOr
- matchesRegularExpression() : RegularExpression
- matches() : StringMatchesFormatDescription
- stringStartsWith() : StringStartsWith
- stringContains() : StringContains
- stringEndsWith() : StringEndsWith
- countOf() : Count
- objectEquals() : ObjectEquals
- 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.
- at() : InvokedAtIndex
- Returns a matcher that matches when the method is executed at the given index.
- 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
Return values
void —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
Return values
void —assertContains()
Asserts that a haystack contains a needle.
assertContains(mixed $needle, iteratable<string|int, mixed> $haystack[, string $message = '' ]) : void
Parameters
- $needle : mixed
- $haystack : iteratable<string|int, mixed>
- $message : string = ''
Tags
Return values
void —assertContainsEquals()
assertContainsEquals(mixed $needle, iteratable<string|int, mixed> $haystack[, string $message = '' ]) : void
Parameters
- $needle : mixed
- $haystack : iteratable<string|int, mixed>
- $message : string = ''
Return values
void —assertNotContains()
Asserts that a haystack does not contain a needle.
assertNotContains(mixed $needle, iteratable<string|int, mixed> $haystack[, string $message = '' ]) : void
Parameters
- $needle : mixed
- $haystack : iteratable<string|int, mixed>
- $message : string = ''
Tags
Return values
void —assertNotContainsEquals()
assertNotContainsEquals(mixed $needle, iteratable<string|int, mixed> $haystack[, string $message = '' ]) : void
Parameters
- $needle : mixed
- $haystack : iteratable<string|int, mixed>
- $message : string = ''
Return values
void —assertContainsOnly()
Asserts that a haystack contains only values of a given type.
assertContainsOnly(string $type, iteratable<string|int, mixed> $haystack[, bool|null $isNativeType = null ][, string $message = '' ]) : void
Parameters
- $type : string
- $haystack : iteratable<string|int, mixed>
- $isNativeType : bool|null = null
- $message : string = ''
Tags
Return values
void —assertContainsOnlyInstancesOf()
Asserts that a haystack contains only instances of a given class name.
assertContainsOnlyInstancesOf(string $className, iteratable<string|int, mixed> $haystack[, string $message = '' ]) : void
Parameters
- $className : string
- $haystack : iteratable<string|int, mixed>
- $message : string = ''
Tags
Return values
void —assertNotContainsOnly()
Asserts that a haystack does not contain only values of a given type.
assertNotContainsOnly(string $type, iteratable<string|int, mixed> $haystack[, bool|null $isNativeType = null ][, string $message = '' ]) : void
Parameters
- $type : string
- $haystack : iteratable<string|int, mixed>
- $isNativeType : bool|null = null
- $message : string = ''
Tags
Return values
void —assertCount()
Asserts the number of elements of an array, Countable or Traversable.
assertCount(int $expectedCount, Countable|iteratable<string|int, mixed> $haystack[, string $message = '' ]) : void
Parameters
- $expectedCount : int
- $haystack : Countable|iteratable<string|int, mixed>
- $message : string = ''
Tags
Return values
void —assertNotCount()
Asserts the number of elements of an array, Countable or Traversable.
assertNotCount(int $expectedCount, Countable|iteratable<string|int, mixed> $haystack[, string $message = '' ]) : void
Parameters
- $expectedCount : int
- $haystack : Countable|iteratable<string|int, mixed>
- $message : string = ''
Tags
Return values
void —assertEquals()
Asserts that two variables are equal.
assertEquals(mixed $expected, mixed $actual[, string $message = '' ]) : void
Parameters
- $expected : mixed
- $actual : mixed
- $message : string = ''
Tags
Return values
void —assertEqualsCanonicalizing()
Asserts that two variables are equal (canonicalizing).
assertEqualsCanonicalizing(mixed $expected, mixed $actual[, string $message = '' ]) : void
Parameters
- $expected : mixed
- $actual : mixed
- $message : string = ''
Tags
Return values
void —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
Return values
void —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
Return values
void —assertNotEquals()
Asserts that two variables are not equal.
assertNotEquals(mixed $expected, mixed $actual[, string $message = '' ]) : void
Parameters
- $expected : mixed
- $actual : mixed
- $message : string = ''
Tags
Return values
void —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
Return values
void —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
Return values
void —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
Return values
void —assertObjectEquals()
assertObjectEquals(object $expected, object $actual[, string $method = 'equals' ][, string $message = '' ]) : void
Parameters
- $expected : object
- $actual : object
- $method : string = 'equals'
- $message : string = ''
Tags
Return values
void —assertEmpty()
Asserts that a variable is empty.
assertEmpty(mixed $actual[, string $message = '' ]) : void
Parameters
- $actual : mixed
- $message : string = ''
Tags
Return values
void —assertNotEmpty()
Asserts that a variable is not empty.
assertNotEmpty(mixed $actual[, string $message = '' ]) : void
Parameters
- $actual : mixed
- $message : string = ''
Tags
Return values
void —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
Return values
void —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
Return values
void —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
Return values
void —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
Return values
void —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
Return values
void —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
Return values
void —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
Return values
void —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
Return values
void —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
Return values
void —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
Return values
void —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
Return values
void —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
Return values
void —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
Return values
void —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
Return values
void —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
Return values
void —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
Return values
void —assertIsReadable()
Asserts that a file/dir is readable.
assertIsReadable(string $filename[, string $message = '' ]) : void
Parameters
- $filename : string
- $message : string = ''
Tags
Return values
void —assertIsNotReadable()
Asserts that a file/dir exists and is not readable.
assertIsNotReadable(string $filename[, string $message = '' ]) : void
Parameters
- $filename : string
- $message : string = ''
Tags
Return values
void —assertNotIsReadable()
Asserts that a file/dir exists and is not readable.
assertNotIsReadable(string $filename[, string $message = '' ]) : void
Parameters
- $filename : string
- $message : string = ''
Tags
Return values
void —assertIsWritable()
Asserts that a file/dir exists and is writable.
assertIsWritable(string $filename[, string $message = '' ]) : void
Parameters
- $filename : string
- $message : string = ''
Tags
Return values
void —assertIsNotWritable()
Asserts that a file/dir exists and is not writable.
assertIsNotWritable(string $filename[, string $message = '' ]) : void
Parameters
- $filename : string
- $message : string = ''
Tags
Return values
void —assertNotIsWritable()
Asserts that a file/dir exists and is not writable.
assertNotIsWritable(string $filename[, string $message = '' ]) : void
Parameters
- $filename : string
- $message : string = ''
Tags
Return values
void —assertDirectoryExists()
Asserts that a directory exists.
assertDirectoryExists(string $directory[, string $message = '' ]) : void
Parameters
- $directory : string
- $message : string = ''
Tags
Return values
void —assertDirectoryDoesNotExist()
Asserts that a directory does not exist.
assertDirectoryDoesNotExist(string $directory[, string $message = '' ]) : void
Parameters
- $directory : string
- $message : string = ''
Tags
Return values
void —assertDirectoryNotExists()
Asserts that a directory does not exist.
assertDirectoryNotExists(string $directory[, string $message = '' ]) : void
Parameters
- $directory : string
- $message : string = ''
Tags
Return values
void —assertDirectoryIsReadable()
Asserts that a directory exists and is readable.
assertDirectoryIsReadable(string $directory[, string $message = '' ]) : void
Parameters
- $directory : string
- $message : string = ''
Tags
Return values
void —assertDirectoryIsNotReadable()
Asserts that a directory exists and is not readable.
assertDirectoryIsNotReadable(string $directory[, string $message = '' ]) : void
Parameters
- $directory : string
- $message : string = ''
Tags
Return values
void —assertDirectoryNotIsReadable()
Asserts that a directory exists and is not readable.
assertDirectoryNotIsReadable(string $directory[, string $message = '' ]) : void
Parameters
- $directory : string
- $message : string = ''
Tags
Return values
void —assertDirectoryIsWritable()
Asserts that a directory exists and is writable.
assertDirectoryIsWritable(string $directory[, string $message = '' ]) : void
Parameters
- $directory : string
- $message : string = ''
Tags
Return values
void —assertDirectoryIsNotWritable()
Asserts that a directory exists and is not writable.
assertDirectoryIsNotWritable(string $directory[, string $message = '' ]) : void
Parameters
- $directory : string
- $message : string = ''
Tags
Return values
void —assertDirectoryNotIsWritable()
Asserts that a directory exists and is not writable.
assertDirectoryNotIsWritable(string $directory[, string $message = '' ]) : void
Parameters
- $directory : string
- $message : string = ''
Tags
Return values
void —assertFileExists()
Asserts that a file exists.
assertFileExists(string $filename[, string $message = '' ]) : void
Parameters
- $filename : string
- $message : string = ''
Tags
Return values
void —assertFileDoesNotExist()
Asserts that a file does not exist.
assertFileDoesNotExist(string $filename[, string $message = '' ]) : void
Parameters
- $filename : string
- $message : string = ''
Tags
Return values
void —assertFileNotExists()
Asserts that a file does not exist.
assertFileNotExists(string $filename[, string $message = '' ]) : void
Parameters
- $filename : string
- $message : string = ''
Tags
Return values
void —assertFileIsReadable()
Asserts that a file exists and is readable.
assertFileIsReadable(string $file[, string $message = '' ]) : void
Parameters
- $file : string
- $message : string = ''
Tags
Return values
void —assertFileIsNotReadable()
Asserts that a file exists and is not readable.
assertFileIsNotReadable(string $file[, string $message = '' ]) : void
Parameters
- $file : string
- $message : string = ''
Tags
Return values
void —assertFileNotIsReadable()
Asserts that a file exists and is not readable.
assertFileNotIsReadable(string $file[, string $message = '' ]) : void
Parameters
- $file : string
- $message : string = ''
Tags
Return values
void —assertFileIsWritable()
Asserts that a file exists and is writable.
assertFileIsWritable(string $file[, string $message = '' ]) : void
Parameters
- $file : string
- $message : string = ''
Tags
Return values
void —assertFileIsNotWritable()
Asserts that a file exists and is not writable.
assertFileIsNotWritable(string $file[, string $message = '' ]) : void
Parameters
- $file : string
- $message : string = ''
Tags
Return values
void —assertFileNotIsWritable()
Asserts that a file exists and is not writable.
assertFileNotIsWritable(string $file[, string $message = '' ]) : void
Parameters
- $file : string
- $message : string = ''
Tags
Return values
void —assertTrue()
Asserts that a condition is true.
assertTrue(mixed $condition[, string $message = '' ]) : void
Parameters
- $condition : mixed
- $message : string = ''
Tags
Return values
void —assertNotTrue()
Asserts that a condition is not true.
assertNotTrue(mixed $condition[, string $message = '' ]) : void
Parameters
- $condition : mixed
- $message : string = ''
Tags
Return values
void —assertFalse()
Asserts that a condition is false.
assertFalse(mixed $condition[, string $message = '' ]) : void
Parameters
- $condition : mixed
- $message : string = ''
Tags
Return values
void —assertNotFalse()
Asserts that a condition is not false.
assertNotFalse(mixed $condition[, string $message = '' ]) : void
Parameters
- $condition : mixed
- $message : string = ''
Tags
Return values
void —assertNull()
Asserts that a variable is null.
assertNull(mixed $actual[, string $message = '' ]) : void
Parameters
- $actual : mixed
- $message : string = ''
Tags
Return values
void —assertNotNull()
Asserts that a variable is not null.
assertNotNull(mixed $actual[, string $message = '' ]) : void
Parameters
- $actual : mixed
- $message : string = ''
Tags
Return values
void —assertFinite()
Asserts that a variable is finite.
assertFinite(mixed $actual[, string $message = '' ]) : void
Parameters
- $actual : mixed
- $message : string = ''
Tags
Return values
void —assertInfinite()
Asserts that a variable is infinite.
assertInfinite(mixed $actual[, string $message = '' ]) : void
Parameters
- $actual : mixed
- $message : string = ''
Tags
Return values
void —assertNan()
Asserts that a variable is nan.
assertNan(mixed $actual[, string $message = '' ]) : void
Parameters
- $actual : mixed
- $message : string = ''
Tags
Return values
void —assertClassHasAttribute()
Asserts that a class has a specified attribute.
assertClassHasAttribute(string $attributeName, string $className[, string $message = '' ]) : void
Parameters
- $attributeName : string
- $className : string
- $message : string = ''
Tags
Return values
void —assertClassNotHasAttribute()
Asserts that a class does not have a specified attribute.
assertClassNotHasAttribute(string $attributeName, string $className[, string $message = '' ]) : void
Parameters
- $attributeName : string
- $className : string
- $message : string = ''
Tags
Return values
void —assertClassHasStaticAttribute()
Asserts that a class has a specified static attribute.
assertClassHasStaticAttribute(string $attributeName, string $className[, string $message = '' ]) : void
Parameters
- $attributeName : string
- $className : string
- $message : string = ''
Tags
Return values
void —assertClassNotHasStaticAttribute()
Asserts that a class does not have a specified static attribute.
assertClassNotHasStaticAttribute(string $attributeName, string $className[, string $message = '' ]) : void
Parameters
- $attributeName : string
- $className : string
- $message : string = ''
Tags
Return values
void —assertObjectHasAttribute()
Asserts that an object has a specified attribute.
assertObjectHasAttribute(string $attributeName, object $object[, string $message = '' ]) : void
Parameters
- $attributeName : string
- $object : object
- $message : string = ''
Tags
Return values
void —assertObjectNotHasAttribute()
Asserts that an object does not have a specified attribute.
assertObjectNotHasAttribute(string $attributeName, object $object[, string $message = '' ]) : void
Parameters
- $attributeName : string
- $object : object
- $message : string = ''
Tags
Return values
void —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
Return values
void —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
Return values
void —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
Return values
void —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
Return values
void —assertIsArray()
Asserts that a variable is of type array.
assertIsArray(mixed $actual[, string $message = '' ]) : void
Parameters
- $actual : mixed
- $message : string = ''
Tags
Return values
void —assertIsBool()
Asserts that a variable is of type bool.
assertIsBool(mixed $actual[, string $message = '' ]) : void
Parameters
- $actual : mixed
- $message : string = ''
Tags
Return values
void —assertIsFloat()
Asserts that a variable is of type float.
assertIsFloat(mixed $actual[, string $message = '' ]) : void
Parameters
- $actual : mixed
- $message : string = ''
Tags
Return values
void —assertIsInt()
Asserts that a variable is of type int.
assertIsInt(mixed $actual[, string $message = '' ]) : void
Parameters
- $actual : mixed
- $message : string = ''
Tags
Return values
void —assertIsNumeric()
Asserts that a variable is of type numeric.
assertIsNumeric(mixed $actual[, string $message = '' ]) : void
Parameters
- $actual : mixed
- $message : string = ''
Tags
Return values
void —assertIsObject()
Asserts that a variable is of type object.
assertIsObject(mixed $actual[, string $message = '' ]) : void
Parameters
- $actual : mixed
- $message : string = ''
Tags
Return values
void —assertIsResource()
Asserts that a variable is of type resource.
assertIsResource(mixed $actual[, string $message = '' ]) : void
Parameters
- $actual : mixed
- $message : string = ''
Tags
Return values
void —assertIsClosedResource()
Asserts that a variable is of type resource and is closed.
assertIsClosedResource(mixed $actual[, string $message = '' ]) : void
Parameters
- $actual : mixed
- $message : string = ''
Tags
Return values
void —assertIsString()
Asserts that a variable is of type string.
assertIsString(mixed $actual[, string $message = '' ]) : void
Parameters
- $actual : mixed
- $message : string = ''
Tags
Return values
void —assertIsScalar()
Asserts that a variable is of type scalar.
assertIsScalar(mixed $actual[, string $message = '' ]) : void
Parameters
- $actual : mixed
- $message : string = ''
Tags
Return values
void —assertIsCallable()
Asserts that a variable is of type callable.
assertIsCallable(mixed $actual[, string $message = '' ]) : void
Parameters
- $actual : mixed
- $message : string = ''
Tags
Return values
void —assertIsIterable()
Asserts that a variable is of type iterable.
assertIsIterable(mixed $actual[, string $message = '' ]) : void
Parameters
- $actual : mixed
- $message : string = ''
Tags
Return values
void —assertIsNotArray()
Asserts that a variable is not of type array.
assertIsNotArray(mixed $actual[, string $message = '' ]) : void
Parameters
- $actual : mixed
- $message : string = ''
Tags
Return values
void —assertIsNotBool()
Asserts that a variable is not of type bool.
assertIsNotBool(mixed $actual[, string $message = '' ]) : void
Parameters
- $actual : mixed
- $message : string = ''
Tags
Return values
void —assertIsNotFloat()
Asserts that a variable is not of type float.
assertIsNotFloat(mixed $actual[, string $message = '' ]) : void
Parameters
- $actual : mixed
- $message : string = ''
Tags
Return values
void —assertIsNotInt()
Asserts that a variable is not of type int.
assertIsNotInt(mixed $actual[, string $message = '' ]) : void
Parameters
- $actual : mixed
- $message : string = ''
Tags
Return values
void —assertIsNotNumeric()
Asserts that a variable is not of type numeric.
assertIsNotNumeric(mixed $actual[, string $message = '' ]) : void
Parameters
- $actual : mixed
- $message : string = ''
Tags
Return values
void —assertIsNotObject()
Asserts that a variable is not of type object.
assertIsNotObject(mixed $actual[, string $message = '' ]) : void
Parameters
- $actual : mixed
- $message : string = ''
Tags
Return values
void —assertIsNotResource()
Asserts that a variable is not of type resource.
assertIsNotResource(mixed $actual[, string $message = '' ]) : void
Parameters
- $actual : mixed
- $message : string = ''
Tags
Return values
void —assertIsNotClosedResource()
Asserts that a variable is not of type resource.
assertIsNotClosedResource(mixed $actual[, string $message = '' ]) : void
Parameters
- $actual : mixed
- $message : string = ''
Tags
Return values
void —assertIsNotString()
Asserts that a variable is not of type string.
assertIsNotString(mixed $actual[, string $message = '' ]) : void
Parameters
- $actual : mixed
- $message : string = ''
Tags
Return values
void —assertIsNotScalar()
Asserts that a variable is not of type scalar.
assertIsNotScalar(mixed $actual[, string $message = '' ]) : void
Parameters
- $actual : mixed
- $message : string = ''
Tags
Return values
void —assertIsNotCallable()
Asserts that a variable is not of type callable.
assertIsNotCallable(mixed $actual[, string $message = '' ]) : void
Parameters
- $actual : mixed
- $message : string = ''
Tags
Return values
void —assertIsNotIterable()
Asserts that a variable is not of type iterable.
assertIsNotIterable(mixed $actual[, string $message = '' ]) : void
Parameters
- $actual : mixed
- $message : string = ''
Tags
Return values
void —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
Return values
void —assertRegExp()
Asserts that a string matches a given regular expression.
assertRegExp(string $pattern, string $string[, string $message = '' ]) : void
Parameters
- $pattern : string
- $string : string
- $message : string = ''
Tags
Return values
void —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
Return values
void —assertNotRegExp()
Asserts that a string does not match a given regular expression.
assertNotRegExp(string $pattern, string $string[, string $message = '' ]) : void
Parameters
- $pattern : string
- $string : string
- $message : string = ''
Tags
Return values
void —assertSameSize()
Assert that the size of two arrays (or `Countable` or `Traversable` objects) is the same.
assertSameSize(Countable|iteratable<string|int, mixed> $expected, Countable|iteratable<string|int, mixed> $actual[, string $message = '' ]) : void
Parameters
- $expected : Countable|iteratable<string|int, mixed>
- $actual : Countable|iteratable<string|int, mixed>
- $message : string = ''
Tags
Return values
void —assertNotSameSize()
Assert that the size of two arrays (or `Countable` or `Traversable` objects) is not the same.
assertNotSameSize(Countable|iteratable<string|int, mixed> $expected, Countable|iteratable<string|int, mixed> $actual[, string $message = '' ]) : void
Parameters
- $expected : Countable|iteratable<string|int, mixed>
- $actual : Countable|iteratable<string|int, mixed>
- $message : string = ''
Tags
Return values
void —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
Return values
void —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
Return values
void —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
Return values
void —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
Return values
void —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
Return values
void —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
Return values
void —assertStringContainsString()
assertStringContainsString(string $needle, string $haystack[, string $message = '' ]) : void
Parameters
- $needle : string
- $haystack : string
- $message : string = ''
Tags
Return values
void —assertStringContainsStringIgnoringCase()
assertStringContainsStringIgnoringCase(string $needle, string $haystack[, string $message = '' ]) : void
Parameters
- $needle : string
- $haystack : string
- $message : string = ''
Tags
Return values
void —assertStringNotContainsString()
assertStringNotContainsString(string $needle, string $haystack[, string $message = '' ]) : void
Parameters
- $needle : string
- $haystack : string
- $message : string = ''
Tags
Return values
void —assertStringNotContainsStringIgnoringCase()
assertStringNotContainsStringIgnoringCase(string $needle, string $haystack[, string $message = '' ]) : void
Parameters
- $needle : string
- $haystack : string
- $message : string = ''
Tags
Return values
void —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
Return values
void —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
Return values
void —assertXmlFileEqualsXmlFile()
Asserts that two XML files are equal.
assertXmlFileEqualsXmlFile(string $expectedFile, string $actualFile[, string $message = '' ]) : void
Parameters
- $expectedFile : string
- $actualFile : string
- $message : string = ''
Tags
Return values
void —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
Return values
void —assertXmlStringEqualsXmlFile()
Asserts that two XML documents are equal.
assertXmlStringEqualsXmlFile(string $expectedFile, DOMDocument|string $actualXml[, string $message = '' ]) : void
Parameters
- $expectedFile : string
- $actualXml : DOMDocument|string
- $message : string = ''
Tags
Return values
void —assertXmlStringNotEqualsXmlFile()
Asserts that two XML documents are not equal.
assertXmlStringNotEqualsXmlFile(string $expectedFile, DOMDocument|string $actualXml[, string $message = '' ]) : void
Parameters
- $expectedFile : string
- $actualXml : DOMDocument|string
- $message : string = ''
Tags
Return values
void —assertXmlStringEqualsXmlString()
Asserts that two XML documents are equal.
assertXmlStringEqualsXmlString(DOMDocument|string $expectedXml, DOMDocument|string $actualXml[, string $message = '' ]) : void
Parameters
- $expectedXml : DOMDocument|string
- $actualXml : DOMDocument|string
- $message : string = ''
Tags
Return values
void —assertXmlStringNotEqualsXmlString()
Asserts that two XML documents are not equal.
assertXmlStringNotEqualsXmlString(DOMDocument|string $expectedXml, DOMDocument|string $actualXml[, string $message = '' ]) : void
Parameters
- $expectedXml : DOMDocument|string
- $actualXml : DOMDocument|string
- $message : string = ''
Tags
Return values
void —assertEqualXMLStructure()
Asserts that a hierarchy of DOMElements matches.
assertEqualXMLStructure(DOMElement $expectedElement, DOMElement $actualElement[, bool $checkAttributes = false ][, string $message = '' ]) : void
Parameters
- $expectedElement : DOMElement
- $actualElement : DOMElement
- $checkAttributes : bool = false
- $message : string = ''
Tags
Return values
void —assertThat()
Evaluates a PHPUnit\Framework\Constraint matcher object.
assertThat(mixed $value, Constraint $constraint[, string $message = '' ]) : void
Parameters
- $value : mixed
- $constraint : Constraint
- $message : string = ''
Tags
Return values
void —assertJson()
Asserts that a string is a valid JSON string.
assertJson(string $actualJson[, string $message = '' ]) : void
Parameters
- $actualJson : string
- $message : string = ''
Tags
Return values
void —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
Return values
void —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
Return values
void —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
Return values
void —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
Return values
void —assertJsonFileEqualsJsonFile()
Asserts that two JSON files are equal.
assertJsonFileEqualsJsonFile(string $expectedFile, string $actualFile[, string $message = '' ]) : void
Parameters
- $expectedFile : string
- $actualFile : string
- $message : string = ''
Tags
Return values
void —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
Return values
void —logicalAnd()
logicalAnd() : LogicalAnd
Return values
LogicalAnd —logicalOr()
logicalOr() : LogicalOr
Return values
LogicalOr —logicalNot()
logicalNot(Constraint $constraint) : LogicalNot
Parameters
- $constraint : Constraint
Return values
LogicalNot —logicalXor()
logicalXor() : LogicalXor
Return values
LogicalXor —anything()
anything() : IsAnything
Return values
IsAnything —isTrue()
isTrue() : IsTrue
Return values
IsTrue —callback()
callback(callable $callback) : Callback
Parameters
- $callback : callable
Return values
Callback —isFalse()
isFalse() : IsFalse
Return values
IsFalse —isJson()
isJson() : IsJson
Return values
IsJson —isNull()
isNull() : IsNull
Return values
IsNull —isFinite()
isFinite() : IsFinite
Return values
IsFinite —isInfinite()
isInfinite() : IsInfinite
Return values
IsInfinite —isNan()
isNan() : IsNan
Return values
IsNan —containsEqual()
containsEqual(mixed $value) : TraversableContainsEqual
Parameters
- $value : mixed
Return values
TraversableContainsEqual —containsIdentical()
containsIdentical(mixed $value) : TraversableContainsIdentical
Parameters
- $value : mixed
Return values
TraversableContainsIdentical —containsOnly()
containsOnly(string $type) : TraversableContainsOnly
Parameters
- $type : string
Return values
TraversableContainsOnly —containsOnlyInstancesOf()
containsOnlyInstancesOf(string $className) : TraversableContainsOnly
Parameters
- $className : string
Return values
TraversableContainsOnly —arrayHasKey()
arrayHasKey(mixed $key) : ArrayHasKey
Parameters
- $key : mixed
Return values
ArrayHasKey —equalTo()
equalTo(mixed $value) : IsEqual
Parameters
- $value : mixed
Return values
IsEqual —equalToCanonicalizing()
equalToCanonicalizing(mixed $value) : IsEqualCanonicalizing
Parameters
- $value : mixed
Return values
IsEqualCanonicalizing —equalToIgnoringCase()
equalToIgnoringCase(mixed $value) : IsEqualIgnoringCase
Parameters
- $value : mixed
Return values
IsEqualIgnoringCase —equalToWithDelta()
equalToWithDelta(mixed $value, float $delta) : IsEqualWithDelta
Parameters
- $value : mixed
- $delta : float
Return values
IsEqualWithDelta —isEmpty()
isEmpty() : IsEmpty
Return values
IsEmpty —isWritable()
isWritable() : IsWritable
Return values
IsWritable —isReadable()
isReadable() : IsReadable
Return values
IsReadable —directoryExists()
directoryExists() : DirectoryExists
Return values
DirectoryExists —fileExists()
fileExists() : FileExists
Return values
FileExists —greaterThan()
greaterThan(mixed $value) : GreaterThan
Parameters
- $value : mixed
Return values
GreaterThan —greaterThanOrEqual()
greaterThanOrEqual(mixed $value) : LogicalOr
Parameters
- $value : mixed
Return values
LogicalOr —classHasAttribute()
classHasAttribute(string $attributeName) : ClassHasAttribute
Parameters
- $attributeName : string
Return values
ClassHasAttribute —classHasStaticAttribute()
classHasStaticAttribute(string $attributeName) : ClassHasStaticAttribute
Parameters
- $attributeName : string
Return values
ClassHasStaticAttribute —objectHasAttribute()
objectHasAttribute(mixed $attributeName) : ObjectHasAttribute
Parameters
- $attributeName : mixed
Return values
ObjectHasAttribute —identicalTo()
identicalTo(mixed $value) : IsIdentical
Parameters
- $value : mixed
Return values
IsIdentical —isInstanceOf()
isInstanceOf(string $className) : IsInstanceOf
Parameters
- $className : string
Return values
IsInstanceOf —isType()
isType(string $type) : IsType
Parameters
- $type : string
Return values
IsType —lessThan()
lessThan(mixed $value) : LessThan
Parameters
- $value : mixed
Return values
LessThan —lessThanOrEqual()
lessThanOrEqual(mixed $value) : LogicalOr
Parameters
- $value : mixed
Return values
LogicalOr —matchesRegularExpression()
matchesRegularExpression(string $pattern) : RegularExpression
Parameters
- $pattern : string
Return values
RegularExpression —matches()
matches(string $string) : StringMatchesFormatDescription
Parameters
- $string : string
Return values
StringMatchesFormatDescription —stringStartsWith()
stringStartsWith(mixed $prefix) : StringStartsWith
Parameters
- $prefix : mixed
Return values
StringStartsWith —stringContains()
stringContains(string $string[, bool $case = true ]) : StringContains
Parameters
- $string : string
- $case : bool = true
Return values
StringContains —stringEndsWith()
stringEndsWith(string $suffix) : StringEndsWith
Parameters
- $suffix : string
Return values
StringEndsWith —countOf()
countOf(int $count) : Count
Parameters
- $count : int
Return values
Count —objectEquals()
objectEquals(object $object[, string $method = 'equals' ]) : ObjectEquals
Parameters
- $object : object
- $method : string = 'equals'
Return values
ObjectEquals —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 —at()
Returns a matcher that matches when the method is executed at the given index.
at(int $index) : InvokedAtIndex
Parameters
- $index : int
Return values
InvokedAtIndex —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(mixed $callback) : ReturnCallback
Parameters
- $callback : mixed
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