ViewController.php 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101
  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-2009 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 'PHPUnit/Util/Filter.php';
  23. PHPUnit_Util_Filter::addFileToFilter(__FILE__);
  24. require_once 'Zend/Controller/Action.php';
  25. /**
  26. * Mock file for testbed
  27. *
  28. * @category Zend
  29. * @package Zend_Controller
  30. * @subpackage UnitTests
  31. * @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
  32. * @license http://framework.zend.com/license/new-bsd New BSD License
  33. */
  34. class ViewController extends Zend_Controller_Action
  35. {
  36. /**
  37. * Test Function for indexAction
  38. *
  39. * @return void
  40. */
  41. public function indexAction()
  42. {
  43. $this->render();
  44. }
  45. /**
  46. * Test Function for testAction
  47. *
  48. * @return void
  49. */
  50. public function testAction()
  51. {
  52. $this->render('index');
  53. }
  54. /**
  55. * Test Function for siteAction
  56. *
  57. * @return void
  58. */
  59. public function siteAction()
  60. {
  61. $this->render('site', null, true);
  62. }
  63. /**
  64. * Test Function for nameAction
  65. *
  66. * @return void
  67. */
  68. public function nameAction()
  69. {
  70. $this->render(null, 'name');
  71. }
  72. /**
  73. * Test Function for scriptAction
  74. *
  75. * @return void
  76. */
  77. public function scriptAction()
  78. {
  79. $this->renderScript('custom/renderScript.php');
  80. }
  81. /**
  82. * Test Function for scriptNameAction
  83. *
  84. * @return void
  85. */
  86. public function scriptNameAction()
  87. {
  88. $this->renderScript('custom/renderScript.php', 'foo');
  89. }
  90. }