aboutsummaryrefslogtreecommitdiffstats
path: root/lib/htmlpurifier/tests/HTMLPurifier/StringHashTest.php
diff options
context:
space:
mode:
Diffstat (limited to 'lib/htmlpurifier/tests/HTMLPurifier/StringHashTest.php')
-rw-r--r--lib/htmlpurifier/tests/HTMLPurifier/StringHashTest.php20
1 files changed, 20 insertions, 0 deletions
diff --git a/lib/htmlpurifier/tests/HTMLPurifier/StringHashTest.php b/lib/htmlpurifier/tests/HTMLPurifier/StringHashTest.php
new file mode 100644
index 000000000..653e5bf70
--- /dev/null
+++ b/lib/htmlpurifier/tests/HTMLPurifier/StringHashTest.php
@@ -0,0 +1,20 @@
+<?php
+
+class HTMLPurifier_StringHashTest extends UnitTestCase
+{
+
+ function testUsed() {
+ $hash = new HTMLPurifier_StringHash(array(
+ 'key' => 'value',
+ 'key2' => 'value2'
+ ));
+ $this->assertIdentical($hash->getAccessed(), array());
+ $t = $hash->offsetGet('key');
+ $this->assertIdentical($hash->getAccessed(), array('key' => true));
+ $hash->resetAccessed();
+ $this->assertIdentical($hash->getAccessed(), array());
+ }
+
+}
+
+// vim: et sw=4 sts=4