Skip to content

Commit

Permalink
Merge pull request #474 from alexislefebvre/2.x-use-sys_get_temp_dir-…
Browse files Browse the repository at this point in the history
…for-tests-cache-and-log

2.x: use sys_get_temp_dir() for tests cache and log
  • Loading branch information
alexislefebvre authored Dec 16, 2018
2 parents f53eb7a + 770e50e commit 478dd98
Show file tree
Hide file tree
Showing 10 changed files with 15 additions and 8 deletions.
2 changes: 0 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,5 @@ vendor
.php_cs.cache

# Ignore files created during tests
/tests/App*/cache/*
/tests/App*/logs/*
/cov/
!.gitkeep
15 changes: 15 additions & 0 deletions tests/App/AppKernel.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,4 +47,19 @@ public function registerContainerConfiguration(LoaderInterface $loader): void
]);
});
}

public function getCacheDir()
{
return $this->getBaseDir().'cache';
}

public function getLogDir()
{
return $this->getBaseDir().'log';
}

protected function getBaseDir()
{
return sys_get_temp_dir().'/LiipFunctionalTestBundle/'.(new \ReflectionClass($this))->getShortName().'/var/';
}
}
Empty file removed tests/App/cache/.gitkeep
Empty file.
Empty file removed tests/App/logs/.gitkeep
Empty file.
1 change: 0 additions & 1 deletion tests/AppConfig/cache/.gitkeep

This file was deleted.

1 change: 0 additions & 1 deletion tests/AppConfig/logs/.gitkeep

This file was deleted.

1 change: 0 additions & 1 deletion tests/AppConfigMysql/cache/.gitkeep

This file was deleted.

1 change: 0 additions & 1 deletion tests/AppConfigMysql/logs/.gitkeep

This file was deleted.

1 change: 0 additions & 1 deletion tests/AppConfigPhpcr/cache/.gitkeep

This file was deleted.

1 change: 0 additions & 1 deletion tests/AppConfigPhpcr/logs/.gitkeep

This file was deleted.

0 comments on commit 478dd98

Please sign in to comment.