MockHelper.php 1008 B

1234567891011121314151617181920212223242526272829303132333435363738
  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\template;
  9. class MockHelper extends \lithium\template\Helper {
  10. protected $_strings = array('link' => '<a href="{:url}"{:options}>{:title}</a>');
  11. /**
  12. * Hack to expose protected properties for testing.
  13. *
  14. * @param string $property
  15. * @return mixed
  16. */
  17. public function __get($property) {
  18. return isset($this->{$property}) ? $this->{$property} : null;
  19. }
  20. public function testOptions($defaults, $options) {
  21. return $this->_options($defaults, $options);
  22. }
  23. public function testAttributes($params, $method = null, array $options = array()) {
  24. return $this->_attributes($params, $method, $options);
  25. }
  26. public function testRender($method, $string, $params, array $options = array()) {
  27. return $this->_render($method, $string, $params, $options);
  28. }
  29. }
  30. ?>