NAME

Test::Apache::RewriteRules::ClientEnvs - Set the expected client environment for |Test::Apache::RewriteRules|

SYNOPSIS

use Test::Apache::RewriteRules;
use Test::Apache::RewriteRules::ClientEnvs;

$apache = Test::Apache::RewriteRules->new;

...

with_docomo_browser {
    $apache->is_redirect(q</> => q</mobile/>);
};

DESCRIPTION

The Test::Apache::RewriteRules::ClientEnvs module defines a number of blocks that can be used to set expected client environment for tests such as is_redirect and is_host_path provided by Test::Apache::RewriteRules object.

BLOCKS

with_UANAME_browser { CODE };

Sets the User-Agent header field of the expected client environment and executes the code. Available UANAMEs include: docomo, ezweb, softbank, iphone, ipod, ipad, android, dsi, wii, firefox, opera, safari, chrome, ie, googlebot, and googlebot_mobile.

with_request_method { CODE } REQUEST_METHOD;

Sets the HTTP request method used by the client, such as GET and POST, and executes the code.

Appends the name-value pair of cookie that is sent to the server by the client.

SEE ALSO

Test::Apache::RewriteRules.

AUTHOR

Wakaba (id:wakabatan) <wakabatan@hatena.ne.jp>

LICENSE

Copyright 2010 Hatena <http://www.hatena.ne.jp/>

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.