ApcTest.php 972 B

12345678910111213141516171819202122232425262728293031323334353637
  1. <?php
  2. /*
  3. * This file is part of the Stash package.
  4. *
  5. * (c) Robert Hafner <tedivm@tedivm.com>
  6. *
  7. * For the full copyright and license information, please view the LICENSE
  8. * file that was distributed with this source code.
  9. */
  10. namespace Stash\Test\Driver;
  11. /**
  12. * @package Stash
  13. * @author Robert Hafner <tedivm@tedivm.com>
  14. */
  15. class ApcTest extends AbstractDriverTest
  16. {
  17. protected $driverClass = 'Stash\Driver\Apc';
  18. protected $persistence = true;
  19. public function testSetOptions()
  20. {
  21. $driverType = $this->driverClass;
  22. $options = $this->getOptions();
  23. $options['namespace'] = 'namespace_test';
  24. $options['ttl'] = 15;
  25. $driver = new $driverType($options);
  26. $this->assertAttributeEquals('namespace_test', 'apcNamespace', $driver, 'APC is setting supplied namespace.');
  27. $this->assertAttributeEquals(15, 'ttl', $driver, 'APC is setting supplied ttl.');
  28. return parent::testSetOptions();
  29. }
  30. }