source: sandbox/2.4-expresso-api/prototype/library/tonic/features/steps/resource.php @ 5888

Revision 5888, 440 bytes checked in by cristiano, 12 years ago (diff)

Ticket #2598 - implementação base REST + oauth

  • Property svn:executable set to *
Line 
1<?php
2
3$steps->When('/^execute the request$/', function($world) {
4    $world->response = $world->resource->exec($world->request);
5});
6
7$steps->Then('/^the response code should be "([^"]*)"$/', function($world, $arg1) {
8    if ($world->response->code != $arg1) throw new Exception;
9});
10
11$steps->Then('/^the response body should be \'([^\']*)\'$/', function($world, $arg1) {
12    if ($world->response->body != $arg1) throw new Exception;
13});
14
Note: See TracBrowser for help on using the repository browser.