TestsAppsController.php 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. <?php
  2. /**
  3. * TestsAppsController file
  4. *
  5. * CakePHP(tm) Tests <http://book.cakephp.org/2.0/en/development/testing.html>
  6. * Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
  7. *
  8. * Licensed under The MIT License
  9. * For full copyright and license information, please see the LICENSE.txt
  10. * Redistributions of files must retain the above copyright notice
  11. *
  12. * @copyright Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
  13. * @link http://book.cakephp.org/2.0/en/development/testing.html CakePHP(tm) Tests
  14. * @package Cake.Test.TestApp.Controller
  15. * @since CakePHP(tm) v 1.2.0.4206
  16. * @license http://www.opensource.org/licenses/mit-license.php MIT License
  17. */
  18. /**
  19. * Class TestsAppsController
  20. *
  21. * @package Cake.Test.TestApp.Controller
  22. */
  23. class TestsAppsController extends AppController {
  24. public $uses = array();
  25. public $components = array('RequestHandler');
  26. public function index() {
  27. $var = '';
  28. if (isset($this->request->query['var'])) {
  29. $var = $this->request->query['var'];
  30. }
  31. $this->set('var', $var);
  32. }
  33. public function some_method() {
  34. return 5;
  35. }
  36. public function set_action() {
  37. $this->set('var', 'string');
  38. $this->render('index');
  39. }
  40. public function redirect_to() {
  41. return $this->redirect('http://cakephp.org');
  42. }
  43. }