Base for a static organization website

TestFireCake.php 1.3KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. <?php
  2. /**
  3. * Common test objects used in DebugKit tests
  4. *
  5. * PHP 5
  6. *
  7. * CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
  8. * Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
  9. *
  10. * Licensed under The MIT License
  11. * Redistributions of files must retain the above copyright notice.
  12. *
  13. * @copyright Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
  14. * @link http://cakephp.org CakePHP(tm) Project
  15. * @since DebugKit 0.1
  16. * @license http://www.opensource.org/licenses/mit-license.php MIT License
  17. */
  18. App::uses('FireCake', 'DebugKit.Lib');
  19. /**
  20. * TestFireCake class allows for testing of FireCake
  21. *
  22. * @since DebugKit 0.1
  23. */
  24. class TestFireCake extends FireCake {
  25. /**
  26. * Headers that were sent
  27. *
  28. * @var array
  29. */
  30. public $sentHeaders = array();
  31. /**
  32. * Send header
  33. *
  34. * @param $name
  35. * @param $value
  36. */
  37. protected function _sendHeader($name, $value) {
  38. $_this = FireCake::getInstance();
  39. $_this->sentHeaders[$name] = $value;
  40. }
  41. /**
  42. * Skip client detection as headers are not being sent.
  43. *
  44. * @return boolean Always true
  45. */
  46. public static function detectClientExtension() {
  47. return true;
  48. }
  49. /**
  50. * Reset FireCake
  51. *
  52. * @return void
  53. */
  54. public static function reset() {
  55. $_this = FireCake::getInstance();
  56. $_this->sentHeaders = array();
  57. $_this->_messageIndex = 1;
  58. }
  59. }