class ApcCacheTest

@group integration

Hierarchy

  • class \Assetic\Test\Cache\ApcCacheTest extends \Assetic\Test\Cache\PHPUnit_Framework_TestCase

Expanded class hierarchy of ApcCacheTest

File

drupal/core/vendor/kriswallsmith/assetic/tests/Assetic/Test/Cache/ApcCacheTest.php, line 19

Namespace

Assetic\Test\Cache
View source
class ApcCacheTest extends \PHPUnit_Framework_TestCase {
  protected function setUp() {
    if (!extension_loaded('apc') || !ini_get('apc.enable_cli')) {
      $this
        ->markTestSkipped('APC must be installed and enabled.');
    }
  }
  public function testCache() {
    $cache = new ApcCache();
    $this
      ->assertFalse($cache
      ->has('foo'));
    $cache
      ->set('foo', 'bar');
    $this
      ->assertEquals('bar', $cache
      ->get('foo'));
    $this
      ->assertTrue($cache
      ->has('foo'));
    $cache
      ->remove('foo');
    $this
      ->assertFalse($cache
      ->has('foo'));
  }

}

Members