public function testRule($options, $value, $expectedResult, $unicodeSetting = null)
{
$rule = new AlnumRule($options);
$filter = new Alnum();
if ($unicodeSetting !== null) {
$property = new \ReflectionProperty($filter, 'unicodeEnabled');
$property->setAccessible(true);
$property->setValue($filter, $unicodeSetting);
}
$result = $filter->apply($rule, $value);
$this->assertEquals($expectedResult, $result);
}