Skip to content

Instantly share code, notes, and snippets.

@adibenc
Created November 4, 2020 05:22
Show Gist options
  • Select an option

  • Save adibenc/5b83343da46e599280f8aa86888b548e to your computer and use it in GitHub Desktop.

Select an option

Save adibenc/5b83343da46e599280f8aa86888b548e to your computer and use it in GitHub Desktop.
phpunit funcs
/home/zam/file
assertArrayHasKey()
assertArrayHasKey(mixed $key, array $array[, string $message = ''])
assertArrayNotHasKey() is the inverse of this assertion and takes the same arguments.
assertClassHasAttribute()
assertClassHasAttribute(string $attributeName, string $className[, string $message = ''])
assertClassNotHasAttribute() is the inverse of this assertion and takes the same arguments.
assertClassHasStaticAttribute()
assertClassHasStaticAttribute(string $attributeName, string $className[, string $message = ''])
assertClassNotHasStaticAttribute() is the inverse of this assertion and takes the same arguments.
assertContains()
assertContains(mixed $needle, iterable $haystack[, string $message = ''])
assertNotContains() is the inverse of this assertion and takes the same arguments.
assertStringContainsString()
assertStringContainsString(string $needle, string $haystack[, string $message = ''])
assertStringNotContainsString() is the inverse of this assertion and takes the same arguments.
assertStringContainsStringIgnoringCase()
assertStringContainsStringIgnoringCase(string $needle, string $haystack[, string $message = ''])
assertStringNotContainsStringIgnoringCase() is the inverse of this assertion and takes the same arguments.
assertContainsOnly()
assertContainsOnly(string $type, iterable $haystack[, boolean $isNativeType = null, string $message = ''])
assertNotContainsOnly() is the inverse of this assertion and takes the same arguments.
assertContainsOnlyInstancesOf()
assertContainsOnlyInstancesOf(string $classname, Traversable|array $haystack[, string $message = ''])
assertCount()
assertCount($expectedCount, $haystack[, string $message = ''])
assertNotCount() is the inverse of this assertion and takes the same arguments.
assertDirectoryExists()
assertDirectoryExists(string $directory[, string $message = ''])
assertDirectoryDoesNotExist() is the inverse of this assertion and takes the same arguments.
assertDirectoryIsReadable()
assertDirectoryIsReadable(string $directory[, string $message = ''])
assertDirectoryIsNotReadable() is the inverse of this assertion and takes the same arguments.
assertDirectoryIsWritable()
assertDirectoryIsWritable(string $directory[, string $message = ''])
assertDirectoryIsNotWritable() is the inverse of this assertion and takes the same arguments.
assertEmpty()
assertEmpty(mixed $actual[, string $message = ''])
assertNotEmpty() is the inverse of this assertion and takes the same arguments.
assertEquals()
assertEquals(mixed $expected, mixed $actual[, string $message = ''])
assertNotEquals() is the inverse of this assertion and takes the same arguments.
assertEquals(DOMDocument $expected, DOMDocument $actual[, string $message = ''])
assertEquals(object $expected, object $actual[, string $message = ''])
assertEquals(array $expected, array $actual[, string $message = ''])
assertEqualsCanonicalizing()
assertEqualsCanonicalizing(mixed $expected, mixed $actual[, string $message = ''])
assertNotEqualsCanonicalizing() is the inverse of this assertion and takes the same arguments.
assertEqualsIgnoringCase()
assertEqualsIgnoringCase(mixed $expected, mixed $actual[, string $message = ''])
assertNotEqualsIgnoringCase() is the inverse of this assertion and takes the same arguments.
assertEqualsWithDelta()
assertEqualsWithDelta(mixed $expected, mixed $actual, float $delta[, string $message = ''])
assertNotEqualsWithDelta() is the inverse of this assertion and takes the same arguments.
assertFalse()
assertFalse(bool $condition[, string $message = ''])
assertNotFalse() is the inverse of this assertion and takes the same arguments.
assertFileEquals()
assertFileEquals(string $expected, string $actual[, string $message = ''])
assertFileNotEquals() is the inverse of this assertion and takes the same arguments.
assertFileExists()
assertFileExists(string $filename[, string $message = ''])
assertFileDoesNotExist() is the inverse of this assertion and takes the same arguments.
assertFileIsReadable()
assertFileIsReadable(string $filename[, string $message = ''])
assertFileIsNotReadable() is the inverse of this assertion and takes the same arguments.
assertFileIsWritable()
assertFileIsWritable(string $filename[, string $message = ''])
assertFileIsNotWritable() is the inverse of this assertion and takes the same arguments.
assertGreaterThan()
assertGreaterThan(mixed $expected, mixed $actual[, string $message = ''])
assertGreaterThanOrEqual()
assertGreaterThanOrEqual(mixed $expected, mixed $actual[, string $message = ''])
assertInfinite()
assertInfinite(mixed $variable[, string $message = ''])
assertFinite() is the inverse of this assertion and takes the same arguments.
assertInstanceOf()
assertInstanceOf($expected, $actual[, $message = ''])
assertNotInstanceOf() is the inverse of this assertion and takes the same arguments.
assertIsArray()
assertIsArray($actual[, $message = ''])
assertIsNotArray() is the inverse of this assertion and takes the same arguments.
assertIsBool()
assertIsBool($actual[, $message = ''])
assertIsNotBool() is the inverse of this assertion and takes the same arguments.
assertIsCallable()
assertIsCallable($actual[, $message = ''])
assertIsNotCallable() is the inverse of this assertion and takes the same arguments.
assertIsFloat()
assertIsFloat($actual[, $message = ''])
assertIsNotFloat() is the inverse of this assertion and takes the same arguments.
assertIsInt()
assertIsInt($actual[, $message = ''])
assertIsNotInt() is the inverse of this assertion and takes the same arguments.
assertIsIterable()
assertIsIterable($actual[, $message = ''])
assertIsNotIterable() is the inverse of this assertion and takes the same arguments.
assertIsNumeric()
assertIsNumeric($actual[, $message = ''])
assertIsNotNumeric() is the inverse of this assertion and takes the same arguments.
assertIsObject()
assertIsObject($actual[, $message = ''])
assertIsNotObject() is the inverse of this assertion and takes the same arguments.
assertIsResource()
assertIsResource($actual[, $message = ''])
assertIsNotResource() is the inverse of this assertion and takes the same arguments.
assertIsScalar()
assertIsScalar($actual[, $message = ''])
assertIsNotScalar() is the inverse of this assertion and takes the same arguments.
assertIsString()
assertIsString($actual[, $message = ''])
assertIsNotString() is the inverse of this assertion and takes the same arguments.
assertIsReadable()
assertIsReadable(string $filename[, string $message = ''])
assertIsNotReadable() is the inverse of this assertion and takes the same arguments.
assertIsWritable()
assertIsWritable(string $filename[, string $message = ''])
assertIsNotWritable() is the inverse of this assertion and takes the same arguments.
assertJsonFileEqualsJsonFile()
assertJsonFileEqualsJsonFile(mixed $expectedFile, mixed $actualFile[, string $message = ''])
assertJsonStringEqualsJsonFile()
assertJsonStringEqualsJsonFile(mixed $expectedFile, mixed $actualJson[, string $message = ''])
assertJsonStringEqualsJsonString()
assertJsonStringEqualsJsonString(mixed $expectedJson, mixed $actualJson[, string $message = ''])
assertLessThan()
assertLessThan(mixed $expected, mixed $actual[, string $message = ''])
assertLessThanOrEqual()
assertLessThanOrEqual(mixed $expected, mixed $actual[, string $message = ''])
assertNan()
assertNan(mixed $variable[, string $message = ''])
assertNull()
assertNull(mixed $variable[, string $message = ''])
assertNotNull() is the inverse of this assertion and takes the same arguments.
assertObjectHasAttribute()
assertObjectHasAttribute(string $attributeName, object $object[, string $message = ''])
assertObjectNotHasAttribute() is the inverse of this assertion and takes the same arguments.
assertMatchesRegularExpression()
assertMatchesRegularExpression(string $pattern, string $string[, string $message = ''])
assertDoesNotMatchRegularExpression() is the inverse of this assertion and takes the same arguments.
assertStringMatchesFormat()
assertStringMatchesFormat(string $format, string $string[, string $message = ''])
assertStringNotMatchesFormat() is the inverse of this assertion and takes the same arguments.
assertStringMatchesFormatFile()
assertStringMatchesFormatFile(string $formatFile, string $string[, string $message = ''])
assertStringNotMatchesFormatFile() is the inverse of this assertion and takes the same arguments.
assertSame()
assertSame(mixed $expected, mixed $actual[, string $message = ''])
assertNotSame() is the inverse of this assertion and takes the same arguments.
assertSame(object $expected, object $actual[, string $message = ''])
assertStringEndsWith()
assertStringEndsWith(string $suffix, string $string[, string $message = ''])
assertStringEndsNotWith() is the inverse of this assertion and takes the same arguments.
assertStringEqualsFile()
assertStringEqualsFile(string $expectedFile, string $actualString[, string $message = ''])
assertStringNotEqualsFile() is the inverse of this assertion and takes the same arguments.
assertStringStartsWith()
assertStringStartsWith(string $prefix, string $string[, string $message = ''])
assertStringStartsNotWith() is the inverse of this assertion and takes the same arguments.
assertThat()
assertThat(mixed $value, PHPUnit\Framework\Constraint $constraint[, $message = ''])
logicalAnd() Logical AND.
logicalNot(PHPUnit\Framework\Constraint $constraint) Logical NOT.
logicalOr() Logical OR.
logicalXor() Logical XOR.
assertTrue()
assertTrue(bool $condition[, string $message = ''])
assertNotTrue() is the inverse of this assertion and takes the same arguments.
assertXmlFileEqualsXmlFile()
assertXmlFileEqualsXmlFile(string $expectedFile, string $actualFile[, string $message = ''])
assertXmlFileNotEqualsXmlFile() is the inverse of this assertion and takes the same arguments.
assertXmlStringEqualsXmlFile()
assertXmlStringEqualsXmlFile(string $expectedFile, string $actualXml[, string $message = ''])
assertXmlStringNotEqualsXmlFile() is the inverse of this assertion and takes the same arguments.
assertXmlStringEqualsXmlString()
assertXmlStringEqualsXmlString(string $expectedXml, string $actualXml[, string $message = ''])
assertXmlStringNotEqualsXmlString() is the inverse of this assertion and takes the same arguments.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment