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

assertNan()

assertNan() assertNan(mixed $variable[, string $message = '']) Reports an error identified by $message if $variable is not NAN. Example A.38: Usage of assertNan() <?php use PHPUnit\Framework\TestCase; class NanTest extends TestCase { public function testFailure() { $this->assertNan(1); } } ?> phpunit NanTest PHPUnit 5.6.0 by Sebastian Bergmann and contributors. F Time: 0 seconds, Memory: 5.00Mb There was 1 failure: 1) NanTest::testFailure Failed asserting tha

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'); }

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

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'); }

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

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(

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

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

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