PHPUnit Manual
Edition for PHPUnit 9.5. Updated on Dec 09, 2020.
Sebastian Bergmann
This work is licensed under the Creative Commons Attribution 3.0 Unported License.
Contents:
-
1. Assertions
- Static vs. Non-Static Usage of Assertion Methods
- assertArrayHasKey()
- assertClassHasAttribute()
- assertClassHasStaticAttribute()
- assertContains()
- assertStringContainsString()
- assertStringContainsStringIgnoringCase()
- assertContainsOnly()
- assertContainsOnlyInstancesOf()
- assertCount()
- assertDirectoryExists()
- assertDirectoryIsReadable()
- assertDirectoryIsWritable()
- assertEmpty()
- assertEquals()
- assertEqualsCanonicalizing()
- assertEqualsIgnoringCase()
- assertEqualsWithDelta()
- assertObjectEquals()
- assertFalse()
- assertFileEquals()
- assertFileExists()
- assertFileIsReadable()
- assertFileIsWritable()
- assertGreaterThan()
- assertGreaterThanOrEqual()
- assertInfinite()
- assertInstanceOf()
- assertIsArray()
- assertIsBool()
- assertIsCallable()
- assertIsFloat()
- assertIsInt()
- assertIsIterable()
- assertIsNumeric()
- assertIsObject()
- assertIsResource()
- assertIsScalar()
- assertIsString()
- assertIsReadable()
- assertIsWritable()
- assertJsonFileEqualsJsonFile()
- assertJsonStringEqualsJsonFile()
- assertJsonStringEqualsJsonString()
- assertLessThan()
- assertLessThanOrEqual()
- assertNan()
- assertNull()
- assertObjectHasAttribute()
- assertMatchesRegularExpression()
- assertStringMatchesFormat()
- assertStringMatchesFormatFile()
- assertSame()
- assertStringEndsWith()
- assertStringEqualsFile()
- assertStringStartsWith()
- assertThat()
- assertTrue()
- assertXmlFileEqualsXmlFile()
- assertXmlStringEqualsXmlFile()
- assertXmlStringEqualsXmlString()
-
2. Annotations
- @author
- @after
- @afterClass
- @backupGlobals
- @backupStaticAttributes
- @before
- @beforeClass
- @codeCoverageIgnore*
- @covers
- @coversDefaultClass
- @coversNothing
- @dataProvider
- @depends
- @doesNotPerformAssertions
- @group
- @large
- @medium
- @preserveGlobalState
- @requires
- @runTestsInSeparateProcesses
- @runInSeparateProcess
- @small
- @test
- @testdox
- @testWith
- @ticket
- @uses
- 3. The XML Configuration File
- 4. Bibliography
- 5. Copyright