diff options
Diffstat (limited to 'library/ezyang/htmlpurifier/tests/HTMLPurifier/StringHashTest.php')
| -rw-r--r-- | library/ezyang/htmlpurifier/tests/HTMLPurifier/StringHashTest.php | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/library/ezyang/htmlpurifier/tests/HTMLPurifier/StringHashTest.php b/library/ezyang/htmlpurifier/tests/HTMLPurifier/StringHashTest.php new file mode 100644 index 0000000000..226d1a4148 --- /dev/null +++ b/library/ezyang/htmlpurifier/tests/HTMLPurifier/StringHashTest.php @@ -0,0 +1,21 @@ +<?php + +class HTMLPurifier_StringHashTest extends UnitTestCase +{ + + public 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 |
