ViewController.php 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
  1. <?php
  2. /**
  3. * Zend Framework
  4. *
  5. * LICENSE
  6. *
  7. * This source file is subject to the new BSD license that is bundled
  8. * with this package in the file LICENSE.txt.
  9. * It is also available through the world-wide-web at this URL:
  10. * http://framework.zend.com/license/new-bsd
  11. * If you did not receive a copy of the license and are unable to
  12. * obtain it through the world-wide-web, please send an email
  13. * to license@zend.com so we can send you a copy immediately.
  14. *
  15. * @category Zend
  16. * @package Zend_Controller
  17. * @subpackage UnitTests
  18. * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
  19. * @license http://framework.zend.com/license/new-bsd New BSD License
  20. * @version $Id$
  21. */
  22. require_once 'Zend/Controller/Action.php';
  23. /**
  24. * Mock file for testbed
  25. *
  26. * @category Zend
  27. * @package Zend_Controller
  28. * @subpackage UnitTests
  29. * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
  30. * @license http://framework.zend.com/license/new-bsd New BSD License
  31. */
  32. class ViewController extends Zend_Controller_Action
  33. {
  34. /**
  35. * Test Function for indexAction
  36. *
  37. * @return void
  38. */
  39. public function indexAction()
  40. {
  41. $this->render();
  42. }
  43. /**
  44. * Test Function for testAction
  45. *
  46. * @return void
  47. */
  48. public function testAction()
  49. {
  50. $this->render('index');
  51. }
  52. /**
  53. * Test Function for siteAction
  54. *
  55. * @return void
  56. */
  57. public function siteAction()
  58. {
  59. $this->render('site', null, true);
  60. }
  61. /**
  62. * Test Function for nameAction
  63. *
  64. * @return void
  65. */
  66. public function nameAction()
  67. {
  68. $this->render(null, 'name');
  69. }
  70. /**
  71. * Test Function for scriptAction
  72. *
  73. * @return void
  74. */
  75. public function scriptAction()
  76. {
  77. $this->renderScript('custom/renderScript.php');
  78. }
  79. /**
  80. * Test Function for scriptNameAction
  81. *
  82. * @return void
  83. */
  84. public function scriptNameAction()
  85. {
  86. $this->renderScript('custom/renderScript.php', 'foo');
  87. }
  88. }