@backupGlobals
  • References/PHP/PHPUnit/Annotations

@backupGlobals The backup and restore operations for global variables can be completely disabled for all tests of a test case class like this

2025-01-10 15:47:30
@expectedExceptionMessage
  • References/PHP/PHPUnit/Annotations

@expectedExceptionMessage The @expectedExceptionMessage annotation works similar to @e

2025-01-10 15:47:30
@after
  • References/PHP/PHPUnit/Annotations

@after The @after annotation can be used to specify methods that should be called after each test method in a

2025-01-10 15:47:30
Fixtures
  • References/PHP/PHPUnit/Guides

One of the most time-consuming parts of writing tests is writing the code to set the world up in a known state and then return it to its original state when the test is complete

2025-01-10 15:47:30
assertTrue()
  • References/PHP/PHPUnit/Assertions

assertTrue() assertTrue(bool $condition[, string $message = ''])

2025-01-10 15:47:30
The Command-Line Test Runner
  • References/PHP/PHPUnit/Guides

The PHPUnit command-line test runner can be invoked through the phpunit command. The following code shows how to run tests with the PHPUnit command-line

2025-01-10 15:47:30
@group
  • References/PHP/PHPUnit/Annotations

@group A test can be tagged as belonging to one or more groups using the @group annotation like this

2025-01-10 15:47:30
assertFileEquals()
  • References/PHP/PHPUnit/Assertions

assertFileEquals() assertFileEquals(string $expected, string $actual[, string $message

2025-01-10 15:47:30
assertStringEqualsFile()
  • References/PHP/PHPUnit/Assertions

assertStringEqualsFile() assertStringEqualsFile(string $expectedFile, string $actualString[

2025-01-10 15:47:30
assertStringMatchesFormat()
  • References/PHP/PHPUnit/Assertions

assertStringMatchesFormat() assertStringMatchesFormat(string $format, string $string[

2025-01-10 15:47:30