Test::Path::Router(3pm) | User Contributed Perl Documentation | Test::Path::Router(3pm) |
Test::Path::Router - A testing module for testing routes
version 0.15
use Test::More plan => 1; use Test::Path::Router; my $router = Path::Router->new; # ... define some routes path_ok($router, 'admin/remove_user/56', '... this is a valid path'); path_is($router, 'admin/edit_user/5', { controller => 'admin', action => 'edit_user', id => 5, }, '... the path and mapping match'); mapping_ok($router, { controller => 'admin', action => 'edit_user', id => 5, }, '... this maps to a valid path'); mapping_is($router, { controller => 'admin', action => 'edit_user', id => 5, }, 'admin/edit_user/5', '... the mapping and path match'); routes_ok($router, { 'admin' => { controller => 'admin', action => 'index', }, 'admin/add_user' => { controller => 'admin', action => 'add_user', }, 'admin/edit_user/5' => { controller => 'admin', action => 'edit_user', id => 5, } }, "... our routes are valid");
This module helps in testing out your path routes, to make sure they are valid.
All complex software has bugs lurking in it, and this module is no exception. If you find a bug please either email me, or add the bug to cpan-RT.
Stevan Little <stevan@cpan.org>
Copyright 2008-2011 Infinity Interactive, Inc.
<http://www.iinteractive.com>
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
Stevan Little <stevan@cpan.org>
This software is copyright (c) 2016 by Infinity Interactive.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
2016-03-01 | perl v5.22.1 |