PHPUnit_Framework_Assert::assertAttributeNotEmpty PHP Method

assertAttributeNotEmpty() public static method

Asserts that a static attribute of a class or an attribute of an object is not empty.
public static assertAttributeNotEmpty ( string $haystackAttributeName, string | object $haystackClassOrObject, string $message = '' )
$haystackAttributeName string
$haystackClassOrObject string | object
$message string
    public static function assertAttributeNotEmpty($haystackAttributeName, $haystackClassOrObject, $message = '')
    {
        static::assertNotEmpty(static::readAttribute($haystackClassOrObject, $haystackAttributeName), $message);
    }

Usage Example

Example #1
0
/**
 * Asserts that a static attribute of a class or an attribute of an object
 * is not empty.
 *
 * @param string $haystackAttributeName
 * @param mixed  $haystackClassOrObject
 * @param string $message
 * @since Method available since Release 3.5.0
 */
function assertAttributeNotEmpty($haystackAttributeName, $haystackClassOrObject, $message = '')
{
    return PHPUnit_Framework_Assert::assertAttributeNotEmpty($haystackAttributeName, $haystackClassOrObject, $message);
}
PHPUnit_Framework_Assert