Commit | Line | Data |
c33bb236 |
1 | use strict; |
2 | use warnings; |
3 | use FindBin qw/$Bin/; |
4 | use lib "$Bin/lib"; |
5 | |
6 | use Test::More; |
7 | use Catalyst::Test 'ESITest'; |
8 | |
9 | like get('/'), |
10 | qr{SubInclude test: will include /time_include using default plugin Catalyst::View::Component::SubInclude::Visit<br/> |
bd14b771 |
11 | Current time is: [\w\s:]+ --> \| foo = bar \|\s* |
c33bb236 |
12 | <br/> |
bd14b771 |
13 | Current time is: [\w\s:]+ --> Capture Arg: test\| baz = quux \|\s* |
c33bb236 |
14 | <br/> |
15 | |
16 | <br/><br/> |
17 | Test subinclude using specific plugins:<br/> |
bd14b771 |
18 | Current time is: [\w\s:]+ --> \| plugin = SubRequest \|\s* |
c33bb236 |
19 | <br/> |
bd14b771 |
20 | Current time is: [\w\s:]+ --> \| plugin = Visit \|\s* |
c33bb236 |
21 | <br/> |
bd14b771 |
22 | <!--esi <esi:include src="/time\?plugin=ESI" /> --><br/> |
23 | <!--#include virtual="/time\?plugin=SSI" --><br/> |
c33bb236 |
24 | |
25 | <br/><br/> |
26 | |
27 | |
bd14b771 |
28 | Test CaptureArgs and Args interaction \(SubRequest\):<br/><br/> |
c33bb236 |
29 | |
bd14b771 |
30 | Current time is: [\w\s:]+ --> Capture Arg: capture_argtest \| query_arg = val \| Action Arg: regular_arg\s* |
c33bb236 |
31 | <br/> |
bd14b771 |
32 | \(using: http://localhost/capture_argtest/time/regular_arg\?query_arg=val\)<br/> |
c33bb236 |
33 | <br/> |
34 | |
bd14b771 |
35 | Current time is: [\w\s:]+ --> \| query_arg = val \| Action Arg: regular_arg\s* |
c33bb236 |
36 | <br/> |
bd14b771 |
37 | \(using: http://localhost/time/regular_arg\?query_arg=val\)<br/> |
c33bb236 |
38 | |
39 | <br/><br/> |
40 | |
bd14b771 |
41 | Test CaptureArgs and Args interaction \(Visit\):<br/><br/> |
c33bb236 |
42 | |
bd14b771 |
43 | Current time is: [\w\s:]+ --> Capture Arg: capture_argtest \| query_arg = val \| Action Arg: regular_arg\s* |
c33bb236 |
44 | <br/> |
bd14b771 |
45 | \(using: http://localhost/capture_argtest/time/regular_arg\?query_arg=val\)<br/> |
c33bb236 |
46 | <br/> |
47 | |
bd14b771 |
48 | Current time is: [\w\s:]+ --> \| query_arg = val \| Action Arg: regular_arg\s* |
c33bb236 |
49 | <br/> |
bd14b771 |
50 | \(using: http://localhost/time/regular_arg\?query_arg=val\)<br/> |
c33bb236 |
51 | |
52 | <br/><br/> |
53 | |
bd14b771 |
54 | Test CaptureArgs and Args interaction \(ESI\):<br/><br/> |
c33bb236 |
55 | |
bd14b771 |
56 | <!--esi <esi:include src="/capture_argtest/time/regular_arg\?query_arg=val" /> --><br/> |
57 | \(using: http://localhost/capture_argtest/time/regular_arg\?query_arg=val\)<br/> |
c33bb236 |
58 | <br/> |
59 | |
bd14b771 |
60 | <!--esi <esi:include src="/time/regular_arg\?query_arg=val" /> --><br/> |
61 | \(using: http://localhost/time/regular_arg\?query_arg=val\)<br/> |
c33bb236 |
62 | |
6582f7e5 |
63 | <br/><br/> |
64 | |
bd14b771 |
65 | Test CaptureArgs and Args interaction \(SSI\):<br/><br/> |
6582f7e5 |
66 | |
bd14b771 |
67 | <!--#include virtual="/capture_argtest/time/regular_arg\?query_arg=val" --><br/> |
68 | \(using: http://localhost/capture_argtest/time/regular_arg\?query_arg=val\)<br/> |
6582f7e5 |
69 | <br/> |
70 | |
bd14b771 |
71 | <!--#include virtual="/time/regular_arg\?query_arg=val" --><br/> |
72 | \(using: http://localhost/time/regular_arg\?query_arg=val\)<br/> |
6582f7e5 |
73 | |
c33bb236 |
74 | <br/><br/><br/> |
75 | |
76 | Test Args when Chained is not being used: |
bd14b771 |
77 | Current time is: [\w\s:]+ --> \| query_arg = val \| No Chained Args: regular_arg1, regular_arg2 |
c33bb236 |
78 | <br/> |
bd14b771 |
79 | \(using: http://localhost/time_args_no_chained/regular_arg1/regular_arg2\?query_arg=val\)<br/> |
c33bb236 |
80 | }; |
81 | |
82 | done_testing; |