PHPUnit_Framework_Assert::assertAttributeNotContainsOnly PHP Method

assertAttributeNotContainsOnly() public static method

Asserts that a haystack that is stored in a static attribute of a class or an attribute of an object does not contain only values of a given type.
public static assertAttributeNotContainsOnly ( string $type, string $haystackAttributeName, string | object $haystackClassOrObject, boolean $isNativeType = null, string $message = '' )
$type string
$haystackAttributeName string
$haystackClassOrObject string | object
$isNativeType boolean
$message string
    public static function assertAttributeNotContainsOnly($type, $haystackAttributeName, $haystackClassOrObject, $isNativeType = null, $message = '')
    {
        static::assertNotContainsOnly($type, static::readAttribute($haystackClassOrObject, $haystackAttributeName), $isNativeType, $message);
    }

Usage Example

Esempio n. 1
0
/**
 * Asserts that a haystack that is stored in a static attribute of a class
 * or an attribute of an object does not contain only values of a given
 * type.
 *
 * @param  string  $type
 * @param  string  $haystackAttributeName
 * @param  mixed   $haystackClassOrObject
 * @param  boolean $isNativeType
 * @param  string  $message
 * @since  Method available since Release 3.1.4
 */
function assertAttributeNotContainsOnly($type, $haystackAttributeName, $haystackClassOrObject, $isNativeType = NULL, $message = '')
{
    return PHPUnit_Framework_Assert::assertAttributeNotContainsOnly($type, $haystackAttributeName, $haystackClassOrObject, $isNativeType, $message);
}
PHPUnit_Framework_Assert