Asserts that a variable is not null.
public static assertNotNull ( mixed $actual, string $message = '' ) | ||
$actual | mixed | |
$message | string |
assertNotNull($value); } }
assertNotNull($array); } }This example is similar to the previous one, but instead of a scalar value, it creates an array and checks that it is not null using `assertNotNull`. The `assertNotNull` function is part of the PHPUnit testing framework, which is a PHP package library that provides a range of testing tools and utilities for developers to write unit and integration tests for their code.
public static assertNotNull ( mixed $actual, string $message = '' ) | ||
$actual | mixed | |
$message | string |