Helper.php 987 B

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. <?php
  2. /**
  3. * Copyright © Magento, Inc. All rights reserved.
  4. * See COPYING.txt for license details.
  5. */
  6. /**
  7. * Mock Filesystem helper
  8. */
  9. namespace Magento\Framework\Backup\Test\Unit\Filesystem;
  10. class Helper
  11. {
  12. /**
  13. * Constant can be used in getInfo() function as second parameter.
  14. * Check whether directory and all files/sub directories are readable
  15. *
  16. * @const int
  17. */
  18. const INFO_READABLE = 2;
  19. /**
  20. * Constant can be used in getInfo() function as second parameter.
  21. * Get directory size
  22. *
  23. * @const int
  24. */
  25. const INFO_SIZE = 4;
  26. /**
  27. * Mock Get information (readable, writable, size) about $path
  28. *
  29. * @param $path
  30. * @param int $infoOptions
  31. * @param array $skipFiles
  32. * @return array
  33. * @SuppressWarnings(PHPMD.UnusedFormalParameter)
  34. */
  35. public function getInfo($path, $infoOptions = self::INFO_ALL, $skipFiles = [])
  36. {
  37. return ['readable' => true, 'size' => 1];
  38. }
  39. }