PHPUnit_Framework_Assert::assertAttributeContains PHP Method

assertAttributeContains() public static method

Asserts that a haystack that is stored in a static attribute of a class or an attribute of an object contains a needle.
public static assertAttributeContains ( mixed $needle, string $haystackAttributeName, string | object $haystackClassOrObject, string $message = '', boolean $ignoreCase = false, boolean $checkForObjectIdentity = true, boolean $checkForNonObjectIdentity = false )
$needle mixed
$haystackAttributeName string
$haystackClassOrObject string | object
$message string
$ignoreCase boolean
$checkForObjectIdentity boolean
$checkForNonObjectIdentity boolean
    public static function assertAttributeContains($needle, $haystackAttributeName, $haystackClassOrObject, $message = '', $ignoreCase = false, $checkForObjectIdentity = true, $checkForNonObjectIdentity = false)
    {
        static::assertContains($needle, static::readAttribute($haystackClassOrObject, $haystackAttributeName), $message, $ignoreCase, $checkForObjectIdentity, $checkForNonObjectIdentity);
    }

Usage Example

Example #1
0
/**
 * Asserts that a haystack that is stored in a static attribute of a class
 * or an attribute of an object contains a needle.
 *
 * @param  mixed   $needle
 * @param  string  $haystackAttributeName
 * @param  mixed   $haystackClassOrObject
 * @param  string  $message
 * @param  boolean $ignoreCase
 * @since  Method available since Release 3.0.0
 */
function assertAttributeContains($needle, $haystackAttributeName, $haystackClassOrObject, $message = '', $ignoreCase = FALSE)
{
    return PHPUnit_Framework_Assert::assertAttributeContains($needle, $haystackAttributeName, $haystackClassOrObject, $message, $ignoreCase);
}
All Usage Examples Of PHPUnit_Framework_Assert::assertAttributeContains
PHPUnit_Framework_Assert