assertLessThanOrEqual()

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

assertLessThan()

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

assertJsonStringEqualsJsonString()

assertJsonStringEqualsJsonString() assertJsonStringEqualsJsonString(mixed $expectedJson, mixed $actualJson[, string $message = '']) Reports an error identified by $message if the value of $actualJson does not match the value of $expectedJson. Example A.35: Usage of assertJsonStringEqualsJsonString() <?php use PHPUnit\Framework\TestCase; class JsonStringEqualsJsonStringTest extends TestCase { public function testFailure() { $this->assertJsonStringEqualsJsonString(

assertJsonStringEqualsJsonFile()

assertJsonStringEqualsJsonFile() assertJsonStringEqualsJsonFile(mixed $expectedFile, mixed $actualJson[, string $message = '']) Reports an error identified by $message if the value of $actualJson does not match the value of $expectedFile. Example A.34: Usage of assertJsonStringEqualsJsonFile() <?php use PHPUnit\Framework\TestCase; class JsonStringEqualsJsonFileTest extends TestCase { public function testFailure() { $this->assertJsonStringEqualsJsonFile( 'p

assertJsonFileEqualsJsonFile()

assertJsonFileEqualsJsonFile() assertJsonFileEqualsJsonFile(mixed $expectedFile, mixed $actualFile[, string $message = '']) Reports an error identified by $message if the value of $actualFile does not match the value of $expectedFile. Example A.33: Usage of assertJsonFileEqualsJsonFile() <?php use PHPUnit\Framework\TestCase; class JsonFileEqualsJsonFileTest extends TestCase { public function testFailure() { $this->assertJsonFileEqualsJsonFile( 'path/to/fixtu

assertIsWritable()

assertIsWritable() assertIsWritable(string $filename[, string $message = '']) Reports an error identified by $message if the file or directory specified by $filename is not writable. assertNotIsWritable() is the inverse of this assertion and takes the same arguments. Example A.32: Usage of assertIsWritable() <?php use PHPUnit\Framework\TestCase; class IsWritableTest extends TestCase { public function testFailure() { $this->assertIsWritable('/path/to/unwritable'); }

assertIsReadable()

assertIsReadable() assertIsReadable(string $filename[, string $message = '']) Reports an error identified by $message if the file or directory specified by $filename is not readable. assertNotIsReadable() is the inverse of this assertion and takes the same arguments. Example A.31: Usage of assertIsReadable() <?php use PHPUnit\Framework\TestCase; class IsReadableTest extends TestCase { public function testFailure() { $this->assertIsReadable('/path/to/unreadable'); }

assertInternalType()

assertInternalType() assertInternalType($expected, $actual[, $message = '']) Reports an error identified by $message if $actual is not of the $expected type. assertNotInternalType() is the inverse of this assertion and takes the same arguments. assertAttributeInternalType() and assertAttributeNotInternalType() are convenience wrappers that can be applied to a public, protected, or private attribute of a class or object. Example A.30: Usage of assertInternalType() <?php use PHPUnit\Framewor

assertInstanceOf()

assertInstanceOf() assertInstanceOf($expected, $actual[, $message = '']) Reports an error identified by $message if $actual is not an instance of $expected. assertNotInstanceOf() is the inverse of this assertion and takes the same arguments. assertAttributeInstanceOf() and assertAttributeNotInstanceOf() are convenience wrappers that can be applied to a public, protected, or private attribute of a class or object. Example A.29: Usage of assertInstanceOf() <?php use PHPUnit\Framework\TestCas

assertInfinite()

assertInfinite() assertInfinite(mixed $variable[, string $message = '']) Reports an error identified by $message if $variable is not INF. assertFinite() is the inverse of this assertion and takes the same arguments. Example A.28: Usage of assertInfinite() <?php use PHPUnit\Framework\TestCase; class InfiniteTest extends TestCase { public function testFailure() { $this->assertInfinite(1); } } ?> phpunit InfiniteTest PHPUnit 5.6.0 by Sebastian Bergmann and contribut