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
|
|
|
{
|
2008-12-06 07:28:20 +00:00
|
|
|
|
2008-04-21 15:24:18 +00:00
|
|
|
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());
|
|
|
|
}
|
2008-12-06 07:28:20 +00:00
|
|
|
|
2008-02-05 01:54:20 +00:00
|
|
|
}
|
2008-12-06 09:24:59 +00:00
|
|
|
|
|
|
|
// vim: et sw=4 sts=4
|