private function getCacheItemMatcher(array $expectedData)
    {
        return Argument::that(function(array $actualData) use ($expectedData) {
            foreach ($expectedData as $key => $value) {
                if (!isset($actualData[$key])) {
                    return false;
                }

                if ($key === 'expiresAt' || $key === 'createdAt') {
                    // We do not need to validate the value of these fields.
                    continue;
                }

                if ($actualData[$key] !== $value) {
                    return false;
                }
            }
            return true;
        });
    }
private function getCacheItemMatcher(array $expectedData)
    {
        return Argument::that(function(array $actualData) use ($expectedData) {
            foreach ($expectedData as $key => $value) {
                if (!isset($actualData[$key])) {
                    return false;
                }

                if ($key === 'expiresAt' || $key === 'createdAt') {
                    // We do not need to validate the value of these fields.
                    continue;
                }

                if ($actualData[$key] !== $value) {
                    return false;
                }
            }
            return true;
        });
    }
private function getCacheItemMatcher ( array $ expectedData ) { return Argument :: that ( function ( array $ actualData ) use ( $ expectedData ) { foreach ( $ expectedData as $ key => $ value ) { if ( ! isset ( $ actualData [ $ key ] ) ) { return false ; } if ( $ key === 'expiresAt' || $ key === 'createdAt' ) { // We do not need to validate the value of these fields. continue ; } if ( $ actualData [ $ key ] !== $ value ) { return false ; } } return true ; } ) ; }
Private function to match cache item data.

@param array $expectedData

@return \Closure
Private function to match cache item data .