~ubuntu-branches/ubuntu/vivid/php-apcu/vivid

« back to all changes in this revision

Viewing changes to apcu-4.0.6/tests/apc_bin_003.phpt

  • Committer: Package Import Robot
  • Author(s): Ondřej Surý
  • Date: 2014-06-24 10:52:52 UTC
  • mfrom: (7.1.4 sid)
  • Revision ID: package-import@ubuntu.com-20140624105252-vsqs1r4og4ykucqg
Tags: 4.0.6-1
* New upstream version 4.0.6
* Remove PHP 5.6 support patch - merged upstream

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
--TEST--
 
2
APC: bindump user cache, variation 3
 
3
--SKIPIF--
 
4
<?php require_once(dirname(__FILE__) . '/skipif.inc'); ?>
 
5
<?php
 
6
/* XXX this is a hack, but otherwise the data for each platform 
 
7
   has te be created manually */
 
8
apc_clear_cache();
 
9
apc_store('foo', 42);
 
10
apc_store('bar', 'foo');
 
11
apcu_bin_dumpfile(NULL, dirname(__FILE__) . '/foo.bin', APC_BIN_VERIFY_MD5 | APC_BIN_VERIFY_CRC32);
 
12
--INI--
 
13
apc.enabled=1
 
14
apc.enable_cli=1
 
15
--FILE--
 
16
<?php
 
17
apc_clear_cache();
 
18
var_dump(apc_fetch('foo'));
 
19
var_dump(apc_fetch('bar'));
 
20
apcu_bin_loadfile(dirname(__FILE__) . '/foo.bin', NULL, APC_BIN_VERIFY_MD5 | APC_BIN_VERIFY_CRC32);
 
21
var_dump(apc_fetch('foo'));
 
22
var_dump(apc_fetch('bar'));
 
23
?>
 
24
===DONE===
 
25
<?php exit(0); ?>
 
26
--CLEAN--
 
27
<?php
 
28
unlink(dirname(__FILE__) . '/foo.bin');
 
29
--EXPECTF--
 
30
bool(false)
 
31
bool(false)
 
32
int(42)
 
33
string(3) "foo"
 
34
===DONE===