Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Added test case for PEAR Bug #19711.

  • Loading branch information...
commit 03552b7eda009b139b2418055327c6fdaf2c4e28 1 parent e9cff77
@coderbyheart coderbyheart authored
Showing with 36 additions and 0 deletions.
  1. +36 −0 tests/pearbug19711.phpt
View
36 tests/pearbug19711.phpt
@@ -0,0 +1,36 @@
+--TEST--
+Cache_Lite::Cache_Lite (PEAR bug #19711)
+--FILE--
+<?php
+
+/**
+ * Test for Pear Bug #19711
+ *
+ * @see https://pear.php.net/bugs/bug.php?id=19711
+ *
+ * @package Cache_Lite
+ * @category Caching
+ * @author Markus Tacker <tacker@php.net>
+ */
+
+require_once 'Cache/Lite.php';
+require_once 'tmpdir.inc';
+
+$options = array(
+ 'cacheDir' => tmpDir() . '/',
+ 'lifeTime' => 60,
+ 'automaticSerialization' => true
+);
+
+$Cache_Lite = new Cache_Lite($options);
+$data = array('apples', 'oranges');
+$Cache_Lite->save($data, 'array_cached');
+$fetched_data = $Cache_Lite->get('array_cached');
+
+var_dump($data === $fetched_data);
+
+?>
+--GET--
+--POST--
+--EXPECT--
+bool(true)
Please sign in to comment.
Something went wrong with that request. Please try again.