Test::Apache::RewriteRules::ClientEnvs - Set the expected client environment for |Test::Apache::RewriteRules|
use Test::Apache::RewriteRules; use Test::Apache::RewriteRules::ClientEnvs; $apache = Test::Apache::RewriteRules->new; ... with_docomo_browser { $apache->is_redirect(q</> => q</mobile/>); };
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.
Test::Apache::RewriteRules::ClientEnvs
is_redirect
is_host_path
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.
User-Agent
docomo
ezweb
softbank
iphone
ipod
ipad
android
dsi
wii
firefox
opera
safari
chrome
ie
googlebot
googlebot_mobile
Sets the HTTP request method used by the client, such as GET and POST, and executes the code.
GET
POST
Appends the name-value pair of cookie that is sent to the server by the client.
Test::Apache::RewriteRules.
Wakaba (id:wakabatan) <wakabatan@hatena.ne.jp>
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.
To install Test::Apache::RewriteRules, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Test::Apache::RewriteRules
CPAN shell
perl -MCPAN -e shell install Test::Apache::RewriteRules
For more information on module installation, please visit the detailed CPAN module installation guide.