ApcTest.php 754 B

12345678910111213141516171819202122232425262728293031
  1. <?php
  2. namespace Gaufrette\Functional\Adapter;
  3. use Gaufrette\Adapter\Apc;
  4. use Gaufrette\Filesystem;
  5. class ApcTest extends FunctionalTestCase
  6. {
  7. public function setUp()
  8. {
  9. if (!extension_loaded('apc')) {
  10. return $this->markTestSkipped('The APC extension is not available.');
  11. } elseif (!ini_get('apc.enabled') || !ini_get('apc.enable_cli')) {
  12. return $this->markTestSkipped('The APC extension is available, but not enabled.');
  13. }
  14. apc_clear_cache('user');
  15. $this->filesystem = new Filesystem(new Apc('gaufrette-test.'));
  16. }
  17. public function tearDown()
  18. {
  19. parent::tearDown();
  20. if (extension_loaded('apc')) {
  21. apc_clear_cache('user');
  22. }
  23. }
  24. }