Documented auto/forward/detach behaviour for chains in Intro
[catagits/Catalyst-Runtime.git] / t / live_component_controller_action_chained.t
CommitLineData
141459fa 1#!perl
2
3use strict;
4use warnings;
5
6use FindBin;
7use lib "$FindBin::Bin/lib";
8
9our $iters;
10
11BEGIN { $iters = $ENV{CAT_BENCH_ITERS} || 2; }
12
2349aeea 13use Test::More tests => 96*$iters;
141459fa 14use Catalyst::Test 'TestApp';
15
16if ( $ENV{CAT_BENCHMARK} ) {
17 require Benchmark;
18 Benchmark::timethis( $iters, \&run_tests );
19}
20else {
21 for ( 1 .. $iters ) {
22 run_tests();
23 }
24}
922c58d6 25
141459fa 26sub run_tests {
d416846e 27
28 #
29 # This is a simple test where the parent and child actions are
30 # within the same controller.
31 #
141459fa 32 {
33 my @expected = qw[
5882c86e 34 TestApp::Controller::Action::Chained->begin
35 TestApp::Controller::Action::Chained->foo
36 TestApp::Controller::Action::Chained->endpoint
37 TestApp::Controller::Action::Chained->end
141459fa 38 ];
922c58d6 39
141459fa 40 my $expected = join( ", ", @expected );
922c58d6 41
5882c86e 42 ok( my $response = request('http://localhost/chained/foo/1/end/2'), 'chained + local endpoint' );
141459fa 43 is( $response->header('X-Catalyst-Executed'),
44 $expected, 'Executed actions' );
45 is( $response->content, '1; 2', 'Content OK' );
46 }
d416846e 47
48 #
49 # This makes sure the above isn't found if the argument for the
50 # end action isn't supplied.
51 #
52 {
53 my $expected = undef;
54
5882c86e 55 ok( my $response = request('http://localhost/chained/foo/1/end'),
56 'chained + local endpoint; missing last argument' );
d416846e 57 is( $response->header('X-Catalyst-Executed'),
58 $expected, 'Executed actions' );
59 is( $response->header('Status'), 500, 'Status OK' );
60 }
61
62 #
63 # Tests the case when the child action is placed in a subcontroller.
64 #
141459fa 65 {
66 my @expected = qw[
5882c86e 67 TestApp::Controller::Action::Chained->begin
68 TestApp::Controller::Action::Chained->foo
69 TestApp::Controller::Action::Chained::Foo->spoon
70 TestApp::Controller::Action::Chained->end
141459fa 71 ];
922c58d6 72
141459fa 73 my $expected = join( ", ", @expected );
922c58d6 74
5882c86e 75 ok( my $response = request('http://localhost/chained/foo/1/spoon'), 'chained + subcontroller endpoint' );
141459fa 76 is( $response->header('X-Catalyst-Executed'),
77 $expected, 'Executed actions' );
78 is( $response->content, '1; ', 'Content OK' );
79 }
d416846e 80
81 #
5882c86e 82 # Tests if the relative specification (e.g.: Chained('bar') ) works
d416846e 83 # as expected.
84 #
141459fa 85 {
86 my @expected = qw[
5882c86e 87 TestApp::Controller::Action::Chained->begin
88 TestApp::Controller::Action::Chained->bar
89 TestApp::Controller::Action::Chained->finale
90 TestApp::Controller::Action::Chained->end
141459fa 91 ];
922c58d6 92
141459fa 93 my $expected = join( ", ", @expected );
922c58d6 94
5882c86e 95 ok( my $response = request('http://localhost/chained/bar/1/spoon'), 'chained + relative endpoint' );
141459fa 96 is( $response->header('X-Catalyst-Executed'),
97 $expected, 'Executed actions' );
98 is( $response->content, '; 1, spoon', 'Content OK' );
99 }
d416846e 100
101 #
102 # Just a test for multiple arguments.
103 #
922c58d6 104 {
105 my @expected = qw[
5882c86e 106 TestApp::Controller::Action::Chained->begin
107 TestApp::Controller::Action::Chained->foo2
108 TestApp::Controller::Action::Chained->endpoint2
109 TestApp::Controller::Action::Chained->end
922c58d6 110 ];
111
112 my $expected = join( ", ", @expected );
113
5882c86e 114 ok( my $response = request('http://localhost/chained/foo2/10/20/end2/15/25'),
115 'chained + local (2 args each)' );
922c58d6 116 is( $response->header('X-Catalyst-Executed'),
117 $expected, 'Executed actions' );
118 is( $response->content, '10, 20; 15, 25', 'Content OK' );
119 }
d416846e 120
121 #
122 # The first three-chain test tries to call the action with :Args(1)
123 # specification. There's also a one action with a :Captures(1)
124 # attribute, that should not be dispatched to.
125 #
922c58d6 126 {
127 my @expected = qw[
5882c86e 128 TestApp::Controller::Action::Chained->begin
129 TestApp::Controller::Action::Chained->one_end
130 TestApp::Controller::Action::Chained->end
922c58d6 131 ];
132
133 my $expected = join( ", ", @expected );
134
5882c86e 135 ok( my $response = request('http://localhost/chained/one/23'),
922c58d6 136 'three-chain (only first)' );
137 is( $response->header('X-Catalyst-Executed'),
138 $expected, 'Executed actions' );
139 is( $response->content, '; 23', 'Content OK' );
140 }
d416846e 141
142 #
143 # This is the second three-chain test, it goes for the action that
144 # handles "/one/$cap/two/$arg1/$arg2" paths. Should be the two action
145 # having :Args(2), not the one having :Captures(2).
146 #
922c58d6 147 {
148 my @expected = qw[
5882c86e 149 TestApp::Controller::Action::Chained->begin
150 TestApp::Controller::Action::Chained->one
151 TestApp::Controller::Action::Chained->two_end
152 TestApp::Controller::Action::Chained->end
922c58d6 153 ];
154
155 my $expected = join( ", ", @expected );
156
5882c86e 157 ok( my $response = request('http://localhost/chained/one/23/two/23/46'),
922c58d6 158 'three-chain (up to second)' );
159 is( $response->header('X-Catalyst-Executed'),
160 $expected, 'Executed actions' );
161 is( $response->content, '23; 23, 46', 'Content OK' );
162 }
d416846e 163
164 #
165 # Last of the three-chain tests. Has no concurrent action with :Captures
166 # and is more thought to simply test the chain as a whole and the 'two'
167 # action specifying :Captures.
168 #
922c58d6 169 {
170 my @expected = qw[
5882c86e 171 TestApp::Controller::Action::Chained->begin
172 TestApp::Controller::Action::Chained->one
173 TestApp::Controller::Action::Chained->two
174 TestApp::Controller::Action::Chained->three_end
175 TestApp::Controller::Action::Chained->end
922c58d6 176 ];
177
178 my $expected = join( ", ", @expected );
179
5882c86e 180 ok( my $response = request('http://localhost/chained/one/23/two/23/46/three/1/2/3'),
922c58d6 181 'three-chain (all three)' );
182 is( $response->header('X-Catalyst-Executed'),
183 $expected, 'Executed actions' );
184 is( $response->content, '23, 23, 46; 1, 2, 3', 'Content OK' );
185 }
d416846e 186
187 #
188 # Tests dispatching on number of arguments for :Args. This should be
189 # dispatched to the action expecting one argument.
190 #
922c58d6 191 {
192 my @expected = qw[
5882c86e 193 TestApp::Controller::Action::Chained->begin
194 TestApp::Controller::Action::Chained->multi1
195 TestApp::Controller::Action::Chained->end
922c58d6 196 ];
197
198 my $expected = join( ", ", @expected );
199
5882c86e 200 ok( my $response = request('http://localhost/chained/multi/23'),
922c58d6 201 'multi-action (one arg)' );
202 is( $response->header('X-Catalyst-Executed'),
203 $expected, 'Executed actions' );
204 is( $response->content, '; 23', 'Content OK' );
205 }
d416846e 206
207 #
208 # Belongs to the former test and goes for the action expecting two arguments.
209 #
922c58d6 210 {
211 my @expected = qw[
5882c86e 212 TestApp::Controller::Action::Chained->begin
213 TestApp::Controller::Action::Chained->multi2
214 TestApp::Controller::Action::Chained->end
922c58d6 215 ];
216
217 my $expected = join( ", ", @expected );
218
5882c86e 219 ok( my $response = request('http://localhost/chained/multi/23/46'),
922c58d6 220 'multi-action (two args)' );
221 is( $response->header('X-Catalyst-Executed'),
222 $expected, 'Executed actions' );
223 is( $response->content, '; 23, 46', 'Content OK' );
224 }
d416846e 225
226 #
227 # Dispatching on argument count again, this time we provide too many
228 # arguments, so dispatching should fail.
229 #
230 {
231 my $expected = undef;
232
5882c86e 233 ok( my $response = request('http://localhost/chained/multi/23/46/67'),
d416846e 234 'multi-action (three args, should lead to error)' );
235 is( $response->header('X-Catalyst-Executed'),
236 $expected, 'Executed actions' );
237 is( $response->header('Status'), 500, 'Status OK' );
238 }
239
240 #
241 # This tests the case when an action says it's the child of an action in
242 # a subcontroller.
243 #
244 {
245 my @expected = qw[
5882c86e 246 TestApp::Controller::Action::Chained->begin
247 TestApp::Controller::Action::Chained::Foo->higher_root
248 TestApp::Controller::Action::Chained->higher_root
249 TestApp::Controller::Action::Chained->end
d416846e 250 ];
251
252 my $expected = join( ", ", @expected );
253
5882c86e 254 ok( my $response = request('http://localhost/chained/higher_root/23/bar/11'),
d416846e 255 'root higher than child' );
256 is( $response->header('X-Catalyst-Executed'),
257 $expected, 'Executed actions' );
258 is( $response->content, '23; 11', 'Content OK' );
259 }
260
261 #
262 # Just a more complex version of the former test. It tests if a controller ->
263 # subcontroller -> controller dispatch works.
264 #
265 {
266 my @expected = qw[
5882c86e 267 TestApp::Controller::Action::Chained->begin
268 TestApp::Controller::Action::Chained->pcp1
269 TestApp::Controller::Action::Chained::Foo->pcp2
270 TestApp::Controller::Action::Chained->pcp3
271 TestApp::Controller::Action::Chained->end
d416846e 272 ];
273
274 my $expected = join( ", ", @expected );
275
5882c86e 276 ok( my $response = request('http://localhost/chained/pcp1/1/pcp2/2/pcp3/3'),
d416846e 277 'parent -> child -> parent' );
278 is( $response->header('X-Catalyst-Executed'),
279 $expected, 'Executed actions' );
280 is( $response->content, '1, 2; 3', 'Content OK' );
281 }
282
283 #
284 # Tests dispatch on capture number. This test is for a one capture action.
285 #
286 {
287 my @expected = qw[
5882c86e 288 TestApp::Controller::Action::Chained->begin
289 TestApp::Controller::Action::Chained->multi_cap1
290 TestApp::Controller::Action::Chained->multi_cap_end1
291 TestApp::Controller::Action::Chained->end
d416846e 292 ];
293
294 my $expected = join( ", ", @expected );
295
5882c86e 296 ok( my $response = request('http://localhost/chained/multi_cap/1/baz'),
d416846e 297 'dispatch on capture num 1' );
298 is( $response->header('X-Catalyst-Executed'),
299 $expected, 'Executed actions' );
300 is( $response->content, '1; ', 'Content OK' );
301 }
302
303 #
304 # Belongs to the former test. This one goes for the action expecting two
305 # captures.
306 #
307 {
308 my @expected = qw[
5882c86e 309 TestApp::Controller::Action::Chained->begin
310 TestApp::Controller::Action::Chained->multi_cap2
311 TestApp::Controller::Action::Chained->multi_cap_end2
312 TestApp::Controller::Action::Chained->end
d416846e 313 ];
314
315 my $expected = join( ", ", @expected );
316
5882c86e 317 ok( my $response = request('http://localhost/chained/multi_cap/1/2/baz'),
d416846e 318 'dispatch on capture num 2' );
319 is( $response->header('X-Catalyst-Executed'),
320 $expected, 'Executed actions' );
321 is( $response->content, '1, 2; ', 'Content OK' );
322 }
323
324 #
325 # Tests the priority of a slurpy arguments action (with :Args) against
326 # two actions chained together. The two actions should win.
327 #
328 {
329 my @expected = qw[
5882c86e 330 TestApp::Controller::Action::Chained->begin
331 TestApp::Controller::Action::Chained->priority_a2
332 TestApp::Controller::Action::Chained->priority_a2_end
333 TestApp::Controller::Action::Chained->end
d416846e 334 ];
335
336 my $expected = join( ", ", @expected );
337
5882c86e 338 ok( my $response = request('http://localhost/chained/priority_a/1/end/2'),
d416846e 339 'priority - slurpy args vs. parent/child' );
340 is( $response->header('X-Catalyst-Executed'),
341 $expected, 'Executed actions' );
342 is( $response->content, '1; 2', 'Content OK' );
343 }
344
345 #
346 # This belongs to the former test but tests if two chained actions have
347 # priority over an action with the exact arguments.
348 #
349 {
350 my @expected = qw[
5882c86e 351 TestApp::Controller::Action::Chained->begin
352 TestApp::Controller::Action::Chained->priority_b2
353 TestApp::Controller::Action::Chained->priority_b2_end
354 TestApp::Controller::Action::Chained->end
d416846e 355 ];
356
357 my $expected = join( ", ", @expected );
358
5882c86e 359 ok( my $response = request('http://localhost/chained/priority_b/1/end/2'),
d416846e 360 'priority - fixed args vs. parent/child' );
361 is( $response->header('X-Catalyst-Executed'),
362 $expected, 'Executed actions' );
363 is( $response->content, '1; 2', 'Content OK' );
364 }
365
366 #
367 # Test dispatching between two controllers that are on the same level and
368 # therefor have no parent/child relationship.
369 #
370 {
371 my @expected = qw[
5882c86e 372 TestApp::Controller::Action::Chained->begin
373 TestApp::Controller::Action::Chained::Bar->cross1
374 TestApp::Controller::Action::Chained::Foo->cross2
375 TestApp::Controller::Action::Chained->end
d416846e 376 ];
377
378 my $expected = join( ", ", @expected );
379
5882c86e 380 ok( my $response = request('http://localhost/chained/cross/1/end/2'),
d416846e 381 'cross controller w/o par/child relation' );
382 is( $response->header('X-Catalyst-Executed'),
383 $expected, 'Executed actions' );
384 is( $response->content, '1; 2', 'Content OK' );
385 }
b25353e5 386
387 #
388 # This is for testing if the arguments got passed to the actions
389 # correctly.
390 #
391 {
392 my @expected = qw[
5882c86e 393 TestApp::Controller::Action::Chained->begin
394 TestApp::Controller::Action::Chained::PassedArgs->first
395 TestApp::Controller::Action::Chained::PassedArgs->second
396 TestApp::Controller::Action::Chained::PassedArgs->third
397 TestApp::Controller::Action::Chained::PassedArgs->end
b25353e5 398 ];
399
400 my $expected = join( ", ", @expected );
401
5882c86e 402 ok( my $response = request('http://localhost/chained/passedargs/a/1/b/2/c/3'),
b25353e5 403 'Correct arguments passed to actions' );
404 is( $response->header('X-Catalyst-Executed'),
405 $expected, 'Executed actions' );
406 is( $response->content, '1; 2; 3', 'Content OK' );
407 }
47f9968d 408
409 #
410 # The :Args attribute is optional, we check the action not specifying
411 # it with these tests.
412 #
413 {
414 my @expected = qw[
5882c86e 415 TestApp::Controller::Action::Chained->begin
416 TestApp::Controller::Action::Chained->opt_args
417 TestApp::Controller::Action::Chained->end
47f9968d 418 ];
419
420 my $expected = join( ", ", @expected );
421
5882c86e 422 ok( my $response = request('http://localhost/chained/opt_args/1/2/3'),
47f9968d 423 'Optional :Args attribute working' );
424 is( $response->header('X-Catalyst-Executed'),
425 $expected, 'Executed actions' );
426 is( $response->content, '; 1, 2, 3', 'Content OK' );
427 }
9cc84996 428
429 #
430 # Tests for optional PathPart attribute.
431 #
432 {
433 my @expected = qw[
5882c86e 434 TestApp::Controller::Action::Chained->begin
435 TestApp::Controller::Action::Chained->opt_pp_start
436 TestApp::Controller::Action::Chained->opt_pathpart
437 TestApp::Controller::Action::Chained->end
9cc84996 438 ];
439
440 my $expected = join( ", ", @expected );
441
5882c86e 442 ok( my $response = request('http://localhost/chained/optpp/1/opt_pathpart/2'),
9cc84996 443 'Optional :PathName attribute working' );
444 is( $response->header('X-Catalyst-Executed'),
445 $expected, 'Executed actions' );
446 is( $response->content, '1; 2', 'Content OK' );
447 }
448
449 #
450 # Tests for optional PathPart *and* Args attributes.
451 #
452 {
453 my @expected = qw[
5882c86e 454 TestApp::Controller::Action::Chained->begin
455 TestApp::Controller::Action::Chained->opt_all_start
456 TestApp::Controller::Action::Chained->oa
457 TestApp::Controller::Action::Chained->end
9cc84996 458 ];
459
460 my $expected = join( ", ", @expected );
461
5882c86e 462 ok( my $response = request('http://localhost/chained/optall/1/oa/2/3'),
9cc84996 463 'Optional :PathName *and* :Args attributes working' );
464 is( $response->header('X-Catalyst-Executed'),
465 $expected, 'Executed actions' );
466 is( $response->content, '1; 2, 3', 'Content OK' );
467 }
0e853a7f 468
469 #
470 # Test if :Chained is the same as :Chained('/')
471 #
472 {
473 my @expected = qw[
474 TestApp::Controller::Action::Chained->begin
475 TestApp::Controller::Action::Chained->rootdef
476 TestApp::Controller::Action::Chained->end
477 ];
478
479 my $expected = join( ", ", @expected );
480
481 ok( my $response = request('http://localhost/chained/rootdef/23'),
482 ":Chained is the same as :Chained('/')" );
483 is( $response->header('X-Catalyst-Executed'),
484 $expected, 'Executed actions' );
485 is( $response->content, '; 23', 'Content OK' );
486 }
487
488 #
f88e7f69 489 # Test if :Chained('.') is working
0e853a7f 490 #
491 {
492 my @expected = qw[
493 TestApp::Controller::Action::Chained->begin
494 TestApp::Controller::Action::Chained->parentchain
495 TestApp::Controller::Action::Chained::ParentChain->child
496 TestApp::Controller::Action::Chained->end
497 ];
498
499 my $expected = join( ", ", @expected );
500
501 ok( my $response = request('http://localhost/chained/parentchain/1/child/2'),
502 ":Chained('.') chains to parent controller action" );
503 is( $response->header('X-Catalyst-Executed'),
504 $expected, 'Executed actions' );
505 is( $response->content, '1; 2', 'Content OK' );
506 }
2349aeea 507
508 #
509 # Test behaviour of auto actions returning '1' for the chain.
510 #
511 {
512 my @expected = qw[
513 TestApp::Controller::Action::Chained->begin
514 TestApp::Controller::Action::Chained::Auto->auto
515 TestApp::Controller::Action::Chained::Auto::Foo->auto
516 TestApp::Controller::Action::Chained::Auto->foo
517 TestApp::Controller::Action::Chained::Auto::Foo->fooend
518 TestApp::Controller::Action::Chained->end
519 ];
520
521 my $expected = join( ", ", @expected );
522
523 ok( my $response = request('http://localhost/chained/autochain1/1/fooend/2'),
524 "Behaviour when auto returns 1 correct" );
525 is( $response->header('X-Catalyst-Executed'),
526 $expected, 'Executed actions' );
527 is( $response->content, '1; 2', 'Content OK' );
528 }
529
530 #
531 # Test behaviour of auto actions returning '0' for the chain.
532 #
533 {
534 my @expected = qw[
535 TestApp::Controller::Action::Chained->begin
536 TestApp::Controller::Action::Chained::Auto->auto
537 TestApp::Controller::Action::Chained::Auto::Bar->auto
538 TestApp::Controller::Action::Chained->end
539 ];
540
541 my $expected = join( ", ", @expected );
542
543 ok( my $response = request('http://localhost/chained/autochain2/1/barend/2'),
544 "Behaviour when auto returns 0 correct" );
545 is( $response->header('X-Catalyst-Executed'),
546 $expected, 'Executed actions' );
547 is( $response->content, '1; 2', 'Content OK' );
548 }
549
550 #
551 # Test what auto actions are run when namespaces are changed
552 # horizontally.
553 #
554 {
555 my @expected = qw[
556 TestApp::Controller::Action::Chained->begin
557 TestApp::Controller::Action::Chained::Auto->auto
558 TestApp::Controller::Action::Chained::Auto::Foo->auto
559 TestApp::Controller::Action::Chained::Auto::Bar->crossloose
560 TestApp::Controller::Action::Chained::Auto::Foo->crossend
561 TestApp::Controller::Action::Chained->end
562 ];
563
564 my $expected = join( ", ", @expected );
565
566 ok( my $response = request('http://localhost/chained/auto_cross/1/crossend/2'),
567 "Correct auto actions are run on cross controller dispatch" );
568 is( $response->header('X-Catalyst-Executed'),
569 $expected, 'Executed actions' );
570 is( $response->content, '1; 2', 'Content OK' );
571 }
572
573 #
574 # Test forwarding from auto action in chain dispatch.
575 #
576 {
577 my @expected = qw[
578 TestApp::Controller::Action::Chained->begin
579 TestApp::Controller::Action::Chained::Auto->auto
580 TestApp::Controller::Action::Chained::Auto::Forward->auto
581 TestApp::Controller::Action::Chained::Auto->fw3
582 TestApp::Controller::Action::Chained::Auto->fw1
583 TestApp::Controller::Action::Chained::Auto::Forward->forwardend
584 TestApp::Controller::Action::Chained->end
585 ];
586
587 my $expected = join( ", ", @expected );
588
589 ok( my $response = request('http://localhost/chained/auto_forward/1/forwardend/2'),
590 "Forwarding out of auto in chain" );
591 is( $response->header('X-Catalyst-Executed'),
592 $expected, 'Executed actions' );
593 is( $response->content, '1; 2', 'Content OK' );
594 }
595
596 #
597 # Detaching out of the auto action of a chain.
598 #
599 {
600 my @expected = qw[
601 TestApp::Controller::Action::Chained->begin
602 TestApp::Controller::Action::Chained::Auto->auto
603 TestApp::Controller::Action::Chained::Auto::Detach->auto
604 TestApp::Controller::Action::Chained::Auto->fw3
605 TestApp::Controller::Action::Chained->end
606 ];
607
608 my $expected = join( ", ", @expected );
609
610 ok( my $response = request('http://localhost/chained/auto_detach/1/detachend/2'),
611 "Detaching out of auto in chain" );
612 is( $response->header('X-Catalyst-Executed'),
613 $expected, 'Executed actions' );
614 is( $response->content, '1; 2', 'Content OK' );
615 }
616
617 #
618 # Test forwarding from auto action in chain dispatch.
619 #
620 {
621 my $expected = undef;
622
623 ok( my $response = request('http://localhost/chained/loose/23'),
624 "Loose end is not callable" );
625 is( $response->header('X-Catalyst-Executed'),
626 $expected, 'Executed actions' );
627 is( $response->header('Status'), 500, 'Status OK' );
628 }
629
630 #
631 # Test forwarding out of a chain.
632 #
633 {
634 my @expected = qw[
635 TestApp::Controller::Action::Chained->begin
636 TestApp::Controller::Action::Chained->chain_fw_a
637 TestApp::Controller::Action::Chained->fw_dt_target
638 TestApp::Controller::Action::Chained->chain_fw_b
639 TestApp::Controller::Action::Chained->end
640 ];
641
642 my $expected = join( ", ", @expected );
643
644 ok( my $response = request('http://localhost/chained/chain_fw/1/end/2'),
645 "Forwarding out a chain" );
646 is( $response->header('X-Catalyst-Executed'),
647 $expected, 'Executed actions' );
648 is( $response->content, '1; 2', 'Content OK' );
649 }
650
651 #
652 # Test detaching out of a chain.
653 #
654 {
655 my @expected = qw[
656 TestApp::Controller::Action::Chained->begin
657 TestApp::Controller::Action::Chained->chain_dt_a
658 TestApp::Controller::Action::Chained->fw_dt_target
659 TestApp::Controller::Action::Chained->end
660 ];
661
662 my $expected = join( ", ", @expected );
663
664 ok( my $response = request('http://localhost/chained/chain_dt/1/end/2'),
665 "Forwarding out a chain" );
666 is( $response->header('X-Catalyst-Executed'),
667 $expected, 'Executed actions' );
668 is( $response->content, '1; 2', 'Content OK' );
669 }
141459fa 670}