SampleKernelTest.php 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. <?php
  2. namespace Test\Michel\Framework\Core\Kernel;
  3. use Michel\Framework\Core\BaseKernel;
  4. class SampleKernelTest extends BaseKernel
  5. {
  6. private string $envFile;
  7. public function __construct(string $envFile)
  8. {
  9. $this->envFile = $envFile;
  10. parent::__construct();
  11. }
  12. public function getProjectDir(): string
  13. {
  14. return dirname(__DIR__);
  15. }
  16. public function getCacheDir(): string
  17. {
  18. return filepath_join($this->getProjectDir(),'cache');
  19. }
  20. public function getLogDir(): string
  21. {
  22. return filepath_join($this->getProjectDir(),'log');
  23. }
  24. public function getConfigDir(): string
  25. {
  26. return filepath_join($this->getProjectDir(),'config');
  27. }
  28. public function getPublicDir(): string
  29. {
  30. return '';
  31. }
  32. public function getEnvFile(): string
  33. {
  34. return filepath_join( $this->getProjectDir(), $this->envFile);
  35. }
  36. protected function afterBoot(): void
  37. {
  38. // TODO: Implement afterBoot() method.
  39. }
  40. }