1Test::Mojo(3)         User Contributed Perl Documentation        Test::Mojo(3)
2
3
4

NAME

6       Test::Mojo - Testing Mojo
7

SYNOPSIS

9         use Test::More;
10         use Test::Mojo;
11
12         my $t = Test::Mojo->new('MyApp');
13
14         # HTML/XML
15         $t->get_ok('/welcome')->status_is(200)->text_is('div#message' => 'Hello!');
16
17         # JSON
18         $t->post_ok('/search.json' => form => {q => 'Perl'})
19           ->status_is(200)
20           ->header_is('Server' => 'Mojolicious (Perl)')
21           ->header_isnt('X-Bender' => 'Bite my shiny metal ass!')
22           ->json_is('/results/4/title' => 'Perl rocks!')
23           ->json_like('/results/7/title' => qr/Perl/);
24
25         # WebSocket
26         $t->websocket_ok('/echo')
27           ->send_ok('hello')
28           ->message_ok
29           ->message_is('echo: hello')
30           ->finish_ok;
31
32         done_testing();
33

DESCRIPTION

35       Test::Mojo is a test user agent based on Mojo::UserAgent, it is usually
36       used together with Test::More to test Mojolicious applications. Just
37       run your tests with prove.
38
39         $ prove -l -v
40         $ prove -l -v t/foo.t
41
42       If it is not already defined, the "MOJO_LOG_LEVEL" environment variable
43       will be set to "debug" or "fatal", depending on the value of the
44       "HARNESS_IS_VERBOSE" environment variable. And to make it esier to test
45       HTTPS/WSS web services "insecure" in Mojo::UserAgent will be activated
46       by default for "ua".
47
48       See Mojolicious::Guides::Testing for more.
49

ATTRIBUTES

51       Test::Mojo implements the following attributes.
52
53   message
54         my $msg = $t->message;
55         $t      = $t->message([text => $bytes]);
56
57       Current WebSocket message represented as an array reference containing
58       the frame type and payload.
59
60         # More specific tests
61         use Mojo::JSON 'decode_json';
62         my $hash = decode_json $t->message->[1];
63         is ref $hash, 'HASH', 'right reference';
64         is $hash->{foo}, 'bar', 'right value';
65
66         # Test custom message
67         $t->message([binary => $bytes])
68           ->json_message_has('/foo/bar')
69           ->json_message_hasnt('/bar')
70           ->json_message_is('/foo/baz' => {yada => [1, 2, 3]});
71
72   success
73         my $bool = $t->success;
74         $t       = $t->success($bool);
75
76       True if the last test was successful.
77
78         # Build custom tests
79         my $location_is = sub {
80           my ($t, $value, $desc) = @_;
81           $desc ||= "Location: $value";
82           local $Test::Builder::Level = $Test::Builder::Level + 1;
83           return $t->success(is($t->tx->res->headers->location, $value, $desc));
84         };
85         $t->get_ok('/')
86           ->status_is(302)
87           ->$location_is('https://mojolicious.org')
88           ->or(sub { diag 'Must have been Joel!' });
89
90   tx
91         my $tx = $t->tx;
92         $t     = $t->tx(Mojo::Transaction::HTTP->new);
93
94       Current transaction, usually a Mojo::Transaction::HTTP or
95       Mojo::Transaction::WebSocket object.
96
97         # More specific tests
98         is $t->tx->res->json->{foo}, 'bar', 'right value';
99         ok $t->tx->res->content->is_multipart, 'multipart content';
100         is $t->tx->previous->res->code, 302, 'right status';
101
102   ua
103         my $ua = $t->ua;
104         $t     = $t->ua(Mojo::UserAgent->new);
105
106       User agent used for testing, defaults to a Mojo::UserAgent object.
107
108         # Allow redirects
109         $t->ua->max_redirects(10);
110         $t->get_ok('/redirect')->status_is(200)->content_like(qr/redirected/);
111
112         # Switch protocol from HTTP to HTTPS
113         $t->ua->server->url('https');
114         $t->get_ok('/secure')->status_is(200)->content_like(qr/secure/);
115
116         # Use absolute URL for request with Basic authentication
117         my $url = $t->ua->server->url->userinfo('sri:secr3t')->path('/secrets.json');
118         $t->post_ok($url => json => {limit => 10})
119           ->status_is(200)
120           ->json_is('/1/content', 'Mojo rocks!');
121
122         # Customize all transactions (including followed redirects)
123         $t->ua->on(start => sub {
124           my ($ua, $tx) = @_;
125           $tx->req->headers->accept_language('en-US');
126         });
127         $t->get_ok('/hello')->status_is(200)->content_like(qr/Howdy/);
128

METHODS

130       Test::Mojo inherits all methods from Mojo::Base and implements the
131       following new ones.
132
133   app
134         my $app = $t->app;
135         $t      = $t->app(Mojolicious->new);
136
137       Access application with "app" in Mojo::UserAgent::Server.
138
139         # Change log level
140         $t->app->log->level('fatal');
141
142         # Test application directly
143         is $t->app->defaults->{foo}, 'bar', 'right value';
144         ok $t->app->routes->find('echo')->is_websocket, 'WebSocket route';
145         my $c = $t->app->build_controller;
146         ok $c->render(template => 'foo'), 'rendering was successful';
147         is $c->res->status, 200, 'right status';
148         is $c->res->body, 'Foo!', 'right content';
149
150         # Change application behavior
151         $t->app->hook(before_dispatch => sub {
152           my $c = shift;
153           $c->render(text => 'This request did not reach the router.')
154             if $c->req->url->path->contains('/user');
155         });
156         $t->get_ok('/user')->status_is(200)->content_like(qr/not reach the router/);
157
158         # Extract additional information
159         my $stash;
160         $t->app->hook(after_dispatch => sub { $stash = shift->stash });
161         $t->get_ok('/hello')->status_is(200);
162         is $stash->{foo}, 'bar', 'right value';
163
164   attr_is
165         $t = $t->attr_is('img.cat', 'alt', 'Grumpy cat');
166         $t = $t->attr_is('img.cat', 'alt', 'Grumpy cat', 'right alt text');
167
168       Checks text content of attribute with "attr" in Mojo::DOM at the CSS
169       selectors first matching HTML/XML element for exact match with "at" in
170       Mojo::DOM.
171
172   attr_isnt
173         $t = $t->attr_isnt('img.cat', 'alt', 'Calm cat');
174         $t = $t->attr_isnt('img.cat', 'alt', 'Calm cat', 'different alt text');
175
176       Opposite of "attr_is".
177
178   attr_like
179         $t = $t->attr_like('img.cat', 'alt', qr/Grumpy/);
180         $t = $t->attr_like('img.cat', 'alt', qr/Grumpy/, 'right alt text');
181
182       Checks text content of attribute with "attr" in Mojo::DOM at the CSS
183       selectors first matching HTML/XML element for similar match with "at"
184       in Mojo::DOM.
185
186   attr_unlike
187         $t = $t->attr_unlike('img.cat', 'alt', qr/Calm/);
188         $t = $t->attr_unlike('img.cat', 'alt', qr/Calm/, 'different alt text');
189
190       Opposite of "attr_like".
191
192   content_is
193         $t = $t->content_is('working!');
194         $t = $t->content_is('working!', 'right content');
195
196       Check response content for exact match after retrieving it from "text"
197       in Mojo::Message.
198
199   content_isnt
200         $t = $t->content_isnt('working!');
201         $t = $t->content_isnt('working!', 'different content');
202
203       Opposite of "content_is".
204
205   content_like
206         $t = $t->content_like(qr/working!/);
207         $t = $t->content_like(qr/working!/, 'right content');
208
209       Check response content for similar match after retrieving it from
210       "text" in Mojo::Message.
211
212   content_type_is
213         $t = $t->content_type_is('text/html');
214         $t = $t->content_type_is('text/html', 'right content type');
215
216       Check response "Content-Type" header for exact match.
217
218   content_type_isnt
219         $t = $t->content_type_isnt('text/html');
220         $t = $t->content_type_isnt('text/html', 'different content type');
221
222       Opposite of "content_type_is".
223
224   content_type_like
225         $t = $t->content_type_like(qr/text/);
226         $t = $t->content_type_like(qr/text/, 'right content type');
227
228       Check response "Content-Type" header for similar match.
229
230   content_type_unlike
231         $t = $t->content_type_unlike(qr/text/);
232         $t = $t->content_type_unlike(qr/text/, 'different content type');
233
234       Opposite of "content_type_like".
235
236   content_unlike
237         $t = $t->content_unlike(qr/working!/);
238         $t = $t->content_unlike(qr/working!/, 'different content');
239
240       Opposite of "content_like".
241
242   delete_ok
243         $t = $t->delete_ok('http://example.com/foo');
244         $t = $t->delete_ok('/foo');
245         $t = $t->delete_ok('/foo' => {Accept => '*/*'} => 'Content!');
246         $t = $t->delete_ok('/foo' => {Accept => '*/*'} => form => {a => 'b'});
247         $t = $t->delete_ok('/foo' => {Accept => '*/*'} => json => {a => 'b'});
248
249       Perform a "DELETE" request and check for transport errors, takes the
250       same arguments as "delete" in Mojo::UserAgent, except for the callback.
251
252   element_count_is
253         $t = $t->element_count_is('div.foo[x=y]', 5);
254         $t = $t->element_count_is('html body div', 30, 'thirty elements');
255
256       Checks the number of HTML/XML elements matched by the CSS selector with
257       "find" in Mojo::DOM.
258
259   element_exists
260         $t = $t->element_exists('div.foo[x=y]');
261         $t = $t->element_exists('html head title', 'has a title');
262
263       Checks for existence of the CSS selectors first matching HTML/XML
264       element with "at" in Mojo::DOM.
265
266         # Check attribute values
267         $t->get_ok('/login')
268           ->element_exists('label[for=email]')
269           ->element_exists('input[name=email][type=text][value*="example.com"]')
270           ->element_exists('label[for=pass]')
271           ->element_exists('input[name=pass][type=password]')
272           ->element_exists('input[type=submit][value]');
273
274   element_exists_not
275         $t = $t->element_exists_not('div.foo[x=y]');
276         $t = $t->element_exists_not('html head title', 'has no title');
277
278       Opposite of "element_exists".
279
280   finish_ok
281         $t = $t->finish_ok;
282         $t = $t->finish_ok(1000);
283         $t = $t->finish_ok(1003 => 'Cannot accept data!');
284
285       Close WebSocket connection gracefully.
286
287   finished_ok
288         $t = $t->finished_ok(1000);
289
290       Wait for WebSocket connection to be closed gracefully and check status.
291
292   get_ok
293         $t = $t->get_ok('http://example.com/foo');
294         $t = $t->get_ok('/foo');
295         $t = $t->get_ok('/foo' => {Accept => '*/*'} => 'Content!');
296         $t = $t->get_ok('/foo' => {Accept => '*/*'} => form => {a => 'b'});
297         $t = $t->get_ok('/foo' => {Accept => '*/*'} => json => {a => 'b'});
298
299       Perform a "GET" request and check for transport errors, takes the same
300       arguments as "get" in Mojo::UserAgent, except for the callback.
301
302         # Run tests against remote host
303         $t->get_ok('https://mojolicious.org/perldoc')->status_is(200);
304
305         # Use relative URL for request with Basic authentication
306         $t->get_ok('//sri:secr3t@/secrets.json')
307           ->status_is(200)
308           ->json_is('/1/content', 'Mojo rocks!');
309
310         # Run additional tests on the transaction
311         $t->get_ok('/foo')->status_is(200);
312         is $t->tx->res->dom->at('input')->val, 'whatever', 'right value';
313
314   head_ok
315         $t = $t->head_ok('http://example.com/foo');
316         $t = $t->head_ok('/foo');
317         $t = $t->head_ok('/foo' => {Accept => '*/*'} => 'Content!');
318         $t = $t->head_ok('/foo' => {Accept => '*/*'} => form => {a => 'b'});
319         $t = $t->head_ok('/foo' => {Accept => '*/*'} => json => {a => 'b'});
320
321       Perform a "HEAD" request and check for transport errors, takes the same
322       arguments as "head" in Mojo::UserAgent, except for the callback.
323
324   header_exists
325         $t = $t->header_exists('ETag');
326         $t = $t->header_exists('ETag', 'header exists');
327
328       Check if response header exists.
329
330   header_exists_not
331         $t = $t->header_exists_not('ETag');
332         $t = $t->header_exists_not('ETag', 'header is missing');
333
334       Opposite of "header_exists".
335
336   header_is
337         $t = $t->header_is(ETag => '"abc321"');
338         $t = $t->header_is(ETag => '"abc321"', 'right header');
339
340       Check response header for exact match.
341
342   header_isnt
343         $t = $t->header_isnt(Etag => '"abc321"');
344         $t = $t->header_isnt(ETag => '"abc321"', 'different header');
345
346       Opposite of "header_is".
347
348   header_like
349         $t = $t->header_like(ETag => qr/abc/);
350         $t = $t->header_like(ETag => qr/abc/, 'right header');
351
352       Check response header for similar match.
353
354   header_unlike
355         $t = $t->header_unlike(ETag => qr/abc/);
356         $t = $t->header_unlike(ETag => qr/abc/, 'different header');
357
358       Opposite of "header_like".
359
360   json_has
361         $t = $t->json_has('/foo');
362         $t = $t->json_has('/minibar', 'has a minibar');
363
364       Check if JSON response contains a value that can be identified using
365       the given JSON Pointer with Mojo::JSON::Pointer.
366
367   json_hasnt
368         $t = $t->json_hasnt('/foo');
369         $t = $t->json_hasnt('/minibar', 'no minibar');
370
371       Opposite of "json_has".
372
373   json_is
374         $t = $t->json_is({foo => [1, 2, 3]});
375         $t = $t->json_is('/foo' => [1, 2, 3]);
376         $t = $t->json_is('/foo/1' => 2, 'right value');
377
378       Check the value extracted from JSON response using the given JSON
379       Pointer with Mojo::JSON::Pointer, which defaults to the root value if
380       it is omitted.
381
382   json_like
383         $t = $t->json_like('/foo/1' => qr/^\d+$/);
384         $t = $t->json_like('/foo/1' => qr/^\d+$/, 'right value');
385
386       Check the value extracted from JSON response using the given JSON
387       Pointer with Mojo::JSON::Pointer for similar match.
388
389   json_message_has
390         $t = $t->json_message_has('/foo');
391         $t = $t->json_message_has('/minibar', 'has a minibar');
392
393       Check if JSON WebSocket message contains a value that can be identified
394       using the given JSON Pointer with Mojo::JSON::Pointer.
395
396   json_message_hasnt
397         $t = $t->json_message_hasnt('/foo');
398         $t = $t->json_message_hasnt('/minibar', 'no minibar');
399
400       Opposite of "json_message_has".
401
402   json_message_is
403         $t = $t->json_message_is({foo => [1, 2, 3]});
404         $t = $t->json_message_is('/foo' => [1, 2, 3]);
405         $t = $t->json_message_is('/foo/1' => 2, 'right value');
406
407       Check the value extracted from JSON WebSocket message using the given
408       JSON Pointer with Mojo::JSON::Pointer, which defaults to the root value
409       if it is omitted.
410
411   json_message_like
412         $t = $t->json_message_like('/foo/1' => qr/^\d+$/);
413         $t = $t->json_message_like('/foo/1' => qr/^\d+$/, 'right value');
414
415       Check the value extracted from JSON WebSocket message using the given
416       JSON Pointer with Mojo::JSON::Pointer for similar match.
417
418   json_message_unlike
419         $t = $t->json_message_unlike('/foo/1' => qr/^\d+$/);
420         $t = $t->json_message_unlike('/foo/1' => qr/^\d+$/, 'different value');
421
422       Opposite of "json_message_like".
423
424   json_unlike
425         $t = $t->json_unlike('/foo/1' => qr/^\d+$/);
426         $t = $t->json_unlike('/foo/1' => qr/^\d+$/, 'different value');
427
428       Opposite of "json_like".
429
430   message_is
431         $t = $t->message_is({binary => $bytes});
432         $t = $t->message_is({text   => $bytes});
433         $t = $t->message_is('working!');
434         $t = $t->message_is('working!', 'right message');
435
436       Check WebSocket message for exact match.
437
438   message_isnt
439         $t = $t->message_isnt({binary => $bytes});
440         $t = $t->message_isnt({text   => $bytes});
441         $t = $t->message_isnt('working!');
442         $t = $t->message_isnt('working!', 'different message');
443
444       Opposite of "message_is".
445
446   message_like
447         $t = $t->message_like({binary => qr/$bytes/});
448         $t = $t->message_like({text   => qr/$bytes/});
449         $t = $t->message_like(qr/working!/);
450         $t = $t->message_like(qr/working!/, 'right message');
451
452       Check WebSocket message for similar match.
453
454   message_ok
455         $t = $t->message_ok;
456         $t = $t->message_ok('got a message');
457
458       Wait for next WebSocket message to arrive.
459
460         # Wait for message and perform multiple tests on it
461         $t->websocket_ok('/time')
462           ->message_ok
463           ->message_like(qr/\d+/)
464           ->message_unlike(qr/\w+/)
465           ->finish_ok;
466
467   message_unlike
468         $t = $t->message_unlike({binary => qr/$bytes/});
469         $t = $t->message_unlike({text   => qr/$bytes/});
470         $t = $t->message_unlike(qr/working!/);
471         $t = $t->message_unlike(qr/working!/, 'different message');
472
473       Opposite of "message_like".
474
475   new
476         my $t = Test::Mojo->new;
477         my $t = Test::Mojo->new('MyApp');
478         my $t = Test::Mojo->new('MyApp', {foo => 'bar'});
479         my $t = Test::Mojo->new(Mojo::File->new('/path/to/myapp.pl'));
480         my $t = Test::Mojo->new(Mojo::File->new('/path/to/myapp.pl'), {foo => 'bar'});
481         my $t = Test::Mojo->new(MyApp->new);
482         my $t = Test::Mojo->new(MyApp->new, {foo => 'bar'});
483
484       Construct a new Test::Mojo object. In addition to a class name or
485       Mojo::File object pointing to the application script, you can pass
486       along a hash reference with configuration values that will be used to
487       override the application configuration. The special configuration value
488       "config_override" will be set in "config" in Mojolicious as well, which
489       is used to disable configuration plugins like
490       Mojolicious::Plugin::Config and Mojolicious::Plugin::JSONConfig for
491       tests.
492
493         # Load application script relative to the "t" directory
494         use Mojo::File 'curfile';
495         my $t = Test::Mojo->new(curfile->dirname->sibling('myapp.pl'));
496
497   options_ok
498         $t = $t->options_ok('http://example.com/foo');
499         $t = $t->options_ok('/foo');
500         $t = $t->options_ok('/foo' => {Accept => '*/*'} => 'Content!');
501         $t = $t->options_ok('/foo' => {Accept => '*/*'} => form => {a => 'b'});
502         $t = $t->options_ok('/foo' => {Accept => '*/*'} => json => {a => 'b'});
503
504       Perform a "OPTIONS" request and check for transport errors, takes the
505       same arguments as "options" in Mojo::UserAgent, except for the
506       callback.
507
508   or
509         $t = $t->or(sub {...});
510
511       Execute callback if the value of "success" is false.
512
513         # Diagnostics
514         $t->get_ok('/bad')->or(sub { diag 'Must have been Glen!' })
515           ->status_is(200)->or(sub { diag $t->tx->res->dom->at('title')->text });
516
517   patch_ok
518         $t = $t->patch_ok('http://example.com/foo');
519         $t = $t->patch_ok('/foo');
520         $t = $t->patch_ok('/foo' => {Accept => '*/*'} => 'Content!');
521         $t = $t->patch_ok('/foo' => {Accept => '*/*'} => form => {a => 'b'});
522         $t = $t->patch_ok('/foo' => {Accept => '*/*'} => json => {a => 'b'});
523
524       Perform a "PATCH" request and check for transport errors, takes the
525       same arguments as "patch" in Mojo::UserAgent, except for the callback.
526
527   post_ok
528         $t = $t->post_ok('http://example.com/foo');
529         $t = $t->post_ok('/foo');
530         $t = $t->post_ok('/foo' => {Accept => '*/*'} => 'Content!');
531         $t = $t->post_ok('/foo' => {Accept => '*/*'} => form => {a => 'b'});
532         $t = $t->post_ok('/foo' => {Accept => '*/*'} => json => {a => 'b'});
533
534       Perform a "POST" request and check for transport errors, takes the same
535       arguments as "post" in Mojo::UserAgent, except for the callback.
536
537         # Test file upload
538         my $upload = {foo => {content => 'bar', filename => 'baz.txt'}};
539         $t->post_ok('/upload' => form => $upload)->status_is(200);
540
541         # Test JSON API
542         $t->post_ok('/hello.json' => json => {hello => 'world'})
543           ->status_is(200)
544           ->json_is({bye => 'world'});
545
546   put_ok
547         $t = $t->put_ok('http://example.com/foo');
548         $t = $t->put_ok('/foo');
549         $t = $t->put_ok('/foo' => {Accept => '*/*'} => 'Content!');
550         $t = $t->put_ok('/foo' => {Accept => '*/*'} => form => {a => 'b'});
551         $t = $t->put_ok('/foo' => {Accept => '*/*'} => json => {a => 'b'});
552
553       Perform a "PUT" request and check for transport errors, takes the same
554       arguments as "put" in Mojo::UserAgent, except for the callback.
555
556   request_ok
557         $t = $t->request_ok(Mojo::Transaction::HTTP->new);
558
559       Perform request and check for transport errors.
560
561         # Request with custom method
562         my $tx = $t->ua->build_tx(FOO => '/test.json' => json => {foo => 1});
563         $t->request_ok($tx)->status_is(200)->json_is({success => 1});
564
565         # Request with custom cookie
566         my $tx = $t->ua->build_tx(GET => '/account');
567         $tx->req->cookies({name => 'user', value => 'sri'});
568         $t->request_ok($tx)->status_is(200)->text_is('head > title' => 'Hello sri');
569
570         # Custom WebSocket handshake
571         my $tx = $t->ua->build_websocket_tx('/foo');
572         $tx->req->headers->remove('User-Agent');
573         $t->request_ok($tx)->message_ok->message_is('bar')->finish_ok;
574
575   reset_session
576         $t = $t->reset_session;
577
578       Reset user agent session.
579
580   send_ok
581         $t = $t->send_ok({binary => $bytes});
582         $t = $t->send_ok({text   => $bytes});
583         $t = $t->send_ok({json   => {test => [1, 2, 3]}});
584         $t = $t->send_ok([$fin, $rsv1, $rsv2, $rsv3, $op, $payload]);
585         $t = $t->send_ok($chars);
586         $t = $t->send_ok($chars, 'sent successfully');
587
588       Send message or frame via WebSocket.
589
590         # Send JSON object as "Text" message
591         $t->websocket_ok('/echo.json')
592           ->send_ok({json => {test => 'I ♥ Mojolicious!'}})
593           ->message_ok
594           ->json_message_is('/test' => 'I ♥ Mojolicious!')
595           ->finish_ok;
596
597   status_is
598         $t = $t->status_is(200);
599         $t = $t->status_is(200, 'right status');
600
601       Check response status for exact match.
602
603   status_isnt
604         $t = $t->status_isnt(200);
605         $t = $t->status_isnt(200, 'different status');
606
607       Opposite of "status_is".
608
609   text_is
610         $t = $t->text_is('div.foo[x=y]' => 'Hello!');
611         $t = $t->text_is('html head title' => 'Hello!', 'right title');
612
613       Checks text content of the CSS selectors first matching HTML/XML
614       element for exact match with "at" in Mojo::DOM.
615
616   text_isnt
617         $t = $t->text_isnt('div.foo[x=y]' => 'Hello!');
618         $t = $t->text_isnt('html head title' => 'Hello!', 'different title');
619
620       Opposite of "text_is".
621
622   text_like
623         $t = $t->text_like('div.foo[x=y]' => qr/Hello/);
624         $t = $t->text_like('html head title' => qr/Hello/, 'right title');
625
626       Checks text content of the CSS selectors first matching HTML/XML
627       element for similar match with "at" in Mojo::DOM.
628
629   text_unlike
630         $t = $t->text_unlike('div.foo[x=y]' => qr/Hello/);
631         $t = $t->text_unlike('html head title' => qr/Hello/, 'different title');
632
633       Opposite of "text_like".
634
635   websocket_ok
636         $t = $t->websocket_ok('http://example.com/echo');
637         $t = $t->websocket_ok('/echo');
638         $t = $t->websocket_ok('/echo' => {DNT => 1} => ['v1.proto']);
639
640       Open a WebSocket connection with transparent handshake, takes the same
641       arguments as "websocket" in Mojo::UserAgent, except for the callback.
642
643         # WebSocket with permessage-deflate compression
644         $t->websocket_ok('/' => {'Sec-WebSocket-Extensions' => 'permessage-deflate'})
645           ->send_ok('y' x 50000)
646           ->message_ok
647           ->message_is('z' x 50000)
648           ->finish_ok;
649

SEE ALSO

651       Mojolicious, Mojolicious::Guides, <https://mojolicious.org>.
652
653
654
655perl v5.30.1                      2020-01-30                     Test::Mojo(3)
Impressum