StringHashTest.php 519 B

1234567891011121314151617181920
  1. <?php
  2. class HTMLPurifier_StringHashTest extends UnitTestCase
  3. {
  4. function testUsed() {
  5. $hash = new HTMLPurifier_StringHash(array(
  6. 'key' => 'value',
  7. 'key2' => 'value2'
  8. ));
  9. $this->assertIdentical($hash->getAccessed(), array());
  10. $t = $hash->offsetGet('key');
  11. $this->assertIdentical($hash->getAccessed(), array('key' => true));
  12. $hash->resetAccessed();
  13. $this->assertIdentical($hash->getAccessed(), array());
  14. }
  15. }
  16. // vim: et sw=4 sts=4