MockResponse.php 822 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. <?php
  2. /**
  3. * Lithium: the most rad php framework
  4. *
  5. * @copyright Copyright 2013, Union of RAD (http://union-of-rad.org)
  6. * @license http://opensource.org/licenses/bsd-license.php The BSD License
  7. */
  8. namespace lithium\tests\mocks\console;
  9. use lithium\util\String;
  10. class MockResponse extends \lithium\console\Response {
  11. public $testAction;
  12. public $testParam;
  13. public function __construct(array $config = array()) {
  14. parent::__construct($config);
  15. $this->output = null;
  16. $this->error = null;
  17. }
  18. public function output($output) {
  19. return $this->output .= String::insert($output, $this->styles(false));
  20. }
  21. public function error($error) {
  22. return $this->error .= String::insert($error, $this->styles(false));
  23. }
  24. public function __destruct() {
  25. $this->output = null;
  26. $this->error = null;
  27. }
  28. }
  29. ?>