christopher-paul-shaw/endpoint-checker

此包最新版本(v1.0.1)没有可用的许可证信息。

获取URL批次的HTTP返回代码

v1.0.1 2018-10-16 14:36 UTC

This package is auto-updated.

Last update: 2024-09-17 10:09:08 UTC


README

此类接受包含URL的负载,并返回当前URL状态的数组

用法

$runner = new CPS\EndpointChecker();
$payload = [
    ['url' => 'https://www.chris-shaw.com', 'title' => 'Authors Homepage'],
    ['url' => 'https://www.example.com', 'title' => 'Example Website'],
];


$result = $runner->process($payload);

测试

随着新功能的添加,将会有新的测试来证明它们按预期工作。您可以使用以下命令自行运行测试。

vendor/bin/phpunit test