]> src.bluestatic.org Git - hoplite.git/blob - testing/tests/http/fixtures.php
Refactor the response type guessing in OutputFilter into a method
[hoplite.git] / testing / tests / http / fixtures.php
1 <?php
2 // Hoplite
3 // Copyright (c) 2011 Blue Static
4 //
5 // This program is free software: you can redistribute it and/or modify it
6 // under the terms of the GNU General Public License as published by the Free
7 // Software Foundation, either version 3 of the License, or any later version.
8 //
9 // This program is distributed in the hope that it will be useful, but WITHOUT
10 // ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 // FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
12 // more details.
13 //
14 // You should have received a copy of the GNU General Public License along with
15 // this program. If not, see <http://www.gnu.org/licenses/>.
16
17 namespace hoplite\test;
18 use \hoplite\http as http;
19
20 class TestRestAction extends \hoplite\http\RestAction
21 {
22 public $did_get = FALSE;
23 public $did_post = FALSE;
24 public $did_delete = FALSE;
25 public $did_put = FALSE;
26
27 public function DoGet(http\Request $request, http\Response $response)
28 {
29 parent::DoGet($request, $response);
30 $this->did_get = TRUE;
31 }
32 public function DoPost(http\Request $request, http\Response $response)
33 {
34 parent::DoPost($request, $response);
35 $this->did_post = TRUE;
36 }
37 public function DoDelete(http\Request $request, http\Response $response)
38 {
39 parent::DoDelete($request, $response);
40 $this->did_delete = TRUE;
41 }
42 public function DoPut(http\Request $request, http\Response $response)
43 {
44 parent::DoPut($request, $response);
45 $this->did_put = TRUE;
46 }
47 }