source: Dev/branches/rest-dojo-ui/server/tonic/features/steps/resource.php @ 256

Last change on this file since 256 was 256, checked in by hendrikvanantwerpen, 13 years ago

Reworked project structure based on REST interaction and Dojo library. As
soon as this is stable, the old jQueryUI branch can be removed (it's
kept for reference).

File size: 440 bytes
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.