2008-02-05 01:54:20 +00:00
|
|
|
<?php
|
|
|
|
|
2008-03-22 19:30:37 +00:00
|
|
|
class HTMLPurifier_StringHashTest extends UnitTestCase
|
2008-02-05 01:54:20 +00:00
|
|
|
{
|
|
|
|
|
|
|
|
public function testUsed() {
|
2008-03-22 19:30:37 +00:00
|
|
|
$hash = new HTMLPurifier_StringHash(array(
|
2008-02-05 01:54:20 +00:00
|
|
|
'key' => 'value',
|
|
|
|
'key2' => 'value2'
|
|
|
|
));
|
|
|
|
$this->assertIdentical($hash->getAccessed(), array());
|
2008-02-07 18:02:18 +00:00
|
|
|
$t = $hash->offsetGet('key');
|
2008-02-05 01:54:20 +00:00
|
|
|
$this->assertIdentical($hash->getAccessed(), array('key' => true));
|
|
|
|
$hash->resetAccessed();
|
|
|
|
$this->assertIdentical($hash->getAccessed(), array());
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|