helpers.php 469 B

1234567891011121314151617181920212223
  1. <?php
  2. if (! function_exists('test_path')) {
  3. /**
  4. * @param string $file
  5. * @return string
  6. */
  7. function test_path($file = '')
  8. {
  9. return __DIR__.($file ? '/'.trim($file, '/') : '');
  10. }
  11. }
  12. if (! function_exists('test_resource_path')) {
  13. /**
  14. * @param string $file
  15. * @return string
  16. */
  17. function test_resource_path($file = '')
  18. {
  19. return test_path('resources'.($file ? '/'.trim($file, '/') : ''));
  20. }
  21. }