Beispiel #1
0
function assertFormatterOption($setting, $value)
{
    // convert API setting name to the property name in the formatter
    $settingPropertyMap = array('wrapWidth' => 'wrapLength', 'maxHeight' => 'height', 'htmlStrict' => 'strictStandards', 'autoLink' => 'link', 'lineNumbers' => 'lineNumbers');
    Luminous::set($setting, $value);
    $formatter = Luminous::formatter();
    $mapped = $settingPropertyMap[$setting];
    $val = $formatter->{$mapped};
    if ($val !== $value) {
        echo "formatter->{$mapped} == {$val}, should be {$value}\n";
        assert(0);
    }
}