BrowserKit是一款模拟浏览器的行为工具。
示例代码:
namespace Acme; use Symfony\Component\BrowserKit\Client as BaseClient; use Symfony\Component\BrowserKit\Response; class Client extends BaseClient { protected function doRequest($request) { // ... convert request into a response return new Response($content, $status, $headers); } }