From 3412e50b54e3daac8745234e21ab6e72be0ed165 Mon Sep 17 00:00:00 2001 From: Thomas Bruederli <thomas@roundcube.net> Date: Wed, 04 Jun 2014 11:20:33 -0400 Subject: [PATCH] Fix attachment menu structure and aria-attributes --- plugins/managesieve/tests/Parser.php | 12 ++++++++++-- 1 files changed, 10 insertions(+), 2 deletions(-) diff --git a/plugins/managesieve/tests/Parser.php b/plugins/managesieve/tests/Parser.php index 00915cc..9050f09 100644 --- a/plugins/managesieve/tests/Parser.php +++ b/plugins/managesieve/tests/Parser.php @@ -5,7 +5,7 @@ function setUp() { - include_once dirname(__FILE__) . '/../lib/rcube_sieve_script.php'; + include_once dirname(__FILE__) . '/../lib/Roundcube/rcube_sieve_script.php'; } /** @@ -15,7 +15,15 @@ */ function test_parser($input, $output, $message) { - $script = new rcube_sieve_script($input); + // get capabilities list from the script + $caps = array(); + if (preg_match('/require \[([a-z0-9", ]+)\]/', $input, $m)) { + foreach (explode(',', $m[1]) as $cap) { + $caps[] = trim($cap, '" '); + } + } + + $script = new rcube_sieve_script($input, $caps); $result = $script->as_text(); $this->assertEquals(trim($result), trim($output), $message); -- Gitblit v1.9.1