clevis / utils-functions-proxy
Simple proxy to function calls that can be mocked.
Installs: 10
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 8
Forks: 0
Open Issues: 0
pkg:composer/clevis/utils-functions-proxy
Requires
- php: >=5.3.0
This package is not auto-updated.
Last update: 2025-10-07 08:35:14 UTC
README
Usage
/** @var ICurlProxy $curl */
$curl = new FunctionsProxy('curl_');
$handle = $curl->init();
$curl->setopt($handle, CURLOPT_URL, 'example.com');
$curl->setopt($handle, CURLOPT_RETURNTRANSFER, 1);
$response = $curl->exec($handle);
$curl->close();
Why
Because unlike built-in functions, this proxy could be mocked in tests.