assertGreaterThanOrEqual()

assertGreaterThanOrEqual() assertGreaterThanOrEqual(mixed $expected, mixed $actual[, string $message = '']) Reports an error identified by $message if the value of $actual is not greater than or equal to the value of $expected. assertAttributeGreaterThanOrEqual() is a convenience wrapper that uses a public, protected, or private attribute of a class or object as the actual value. Example A.27: Usage of assertGreaterThanOrEqual() <?php use PHPUnit\Framework\TestCase; class GreatThanOrEqual

assertGreaterThan()

assertGreaterThan() assertGreaterThan(mixed $expected, mixed $actual[, string $message = '']) Reports an error identified by $message if the value of $actual is not greater than the value of $expected. assertAttributeGreaterThan() is a convenience wrapper that uses a public, protected, or private attribute of a class or object as the actual value. Example A.26: Usage of assertGreaterThan() <?php use PHPUnit\Framework\TestCase; class GreaterThanTest extends TestCase { public function t

assertFileIsWritable()

assertFileIsWritable() assertFileIsWritable(string $filename[, string $message = '']) Reports an error identified by $message if the file specified by $filename is not a file or is not writable. assertFileNotIsWritable() is the inverse of this assertion and takes the same arguments. Example A.25: Usage of assertFileIsWritable() <?php use PHPUnit\Framework\TestCase; class FileIsWritableTest extends TestCase { public function testFailure() { $this->assertFileIsWritable('/

assertFileIsReadable()

assertFileIsReadable() assertFileIsReadable(string $filename[, string $message = '']) Reports an error identified by $message if the file specified by $filename is not a file or is not readable. assertFileNotIsReadable() is the inverse of this assertion and takes the same arguments. Example A.24: Usage of assertFileIsReadable() <?php use PHPUnit\Framework\TestCase; class FileIsReadableTest extends TestCase { public function testFailure() { $this->assertFileIsReadable('/

assertFileExists()

assertFileExists() assertFileExists(string $filename[, string $message = '']) Reports an error identified by $message if the file specified by $filename does not exist. assertFileNotExists() is the inverse of this assertion and takes the same arguments. Example A.23: Usage of assertFileExists() <?php use PHPUnit\Framework\TestCase; class FileExistsTest extends TestCase { public function testFailure() { $this->assertFileExists('/path/to/file'); } } ?> phpunit File

assertFileEquals()

assertFileEquals() assertFileEquals(string $expected, string $actual[, string $message = '']) Reports an error identified by $message if the file specified by $expected does not have the same contents as the file specified by $actual. assertFileNotEquals() is the inverse of this assertion and takes the same arguments. Example A.22: Usage of assertFileEquals() <?php use PHPUnit\Framework\TestCase; class FileEqualsTest extends TestCase { public function testFailure() { $this

assertFalse()

assertFalse() assertFalse(bool $condition[, string $message = '']) Reports an error identified by $message if $condition is true. assertNotFalse() is the inverse of this assertion and takes the same arguments. Example A.21: Usage of assertFalse() <?php use PHPUnit\Framework\TestCase; class FalseTest extends TestCase { public function testFailure() { $this->assertFalse(true); } } ?> phpunit FalseTest PHPUnit 5.6.0 by Sebastian Bergmann and contributors. F Time:

assertEqualXMLStructure()

assertEqualXMLStructure() assertEqualXMLStructure(DOMElement $expectedElement, DOMElement $actualElement[, boolean $checkAttributes = false, string $message = '']) Reports an error identified by $message if the XML Structure of the DOMElement in $actualElement is not equal to the XML structure of the DOMElement in $expectedElement. Example A.15: Usage of assertEqualXMLStructure() <?php use PHPUnit\Framework\TestCase; class EqualXMLStructureTest extends TestCase { public function testF

assertEquals()

assertEquals() assertEquals(mixed $expected, mixed $actual[, string $message = '']) Reports an error identified by $message if the two variables $expected and $actual are not equal. assertNotEquals() is the inverse of this assertion and takes the same arguments. assertAttributeEquals() and assertAttributeNotEquals() are convenience wrappers that use a public, protected, or private attribute of a class or object as the actual value. Example A.16: Usage of assertEquals() <?php use PHPUnit\Fr

assertEmpty()

assertEmpty() assertEmpty(mixed $actual[, string $message = '']) Reports an error identified by $message if $actual is not empty. assertNotEmpty() is the inverse of this assertion and takes the same arguments. assertAttributeEmpty() and assertAttributeNotEmpty() are convenience wrappers that can be applied to a public, protected, or private attribute of a class or object. Example A.14: Usage of assertEmpty() <?php use PHPUnit\Framework\TestCase; class EmptyTest extends TestCase { publ