Translation update done using Pootle.
[phpmyadmin/ammaryasirr.git] / test / libraries / rte / PMA_EVN_getDataFromRequest_test.php
blob382ade5053c5114c372560d64552ecd9e1a06667
1 <?php
2 /* vim: set expandtab sw=4 ts=4 sts=4: */
3 /**
4 * Test for fetching event data from HTTP request
6 * @package phpMyAdmin-test
7 */
9 /*
10 * Include to test.
12 require_once 'libraries/rte/rte_events.lib.php';
14 class PMA_EVN_getDataFromRequest_test extends PHPUnit_Framework_TestCase
16 /**
17 * @dataProvider provider
19 public function testgetDataFromRequest_empty($in, $out)
21 global $_REQUEST;
23 unset($_REQUEST);
24 foreach ($in as $key => $value) {
25 if ($value !== '') {
26 $_REQUEST[$key] = $value;
29 $this->assertEquals($out, PMA_EVN_getDataFromRequest());
32 public function provider()
34 return array(
35 array(
36 array(
37 'item_name' => '',
38 'item_type' => '',
39 'item_original_name' => '',
40 'item_status' => '',
41 'item_execute_at' => '',
42 'item_interval_value' => '',
43 'item_interval_field' => '',
44 'item_starts' => '',
45 'item_ends' => '',
46 'item_definition' => '',
47 'item_preserve' => '',
48 'item_comment' => '',
49 'item_definer' => ''
51 array(
52 'item_name' => '',
53 'item_type' => 'ONE TIME',
54 'item_type_toggle' => 'RECURRING',
55 'item_original_name' => '',
56 'item_status' => '',
57 'item_execute_at' => '',
58 'item_interval_value' => '',
59 'item_interval_field' => '',
60 'item_starts' => '',
61 'item_ends' => '',
62 'item_definition' => '',
63 'item_preserve' => '',
64 'item_comment' => '',
65 'item_definer' => ''
68 array(
69 array(
70 'item_name' => 'foo',
71 'item_type' => 'RECURRING',
72 'item_original_name' => 'foo',
73 'item_status' => 'foo',
74 'item_execute_at' => 'foo',
75 'item_interval_value' => 'foo',
76 'item_interval_field' => 'foo',
77 'item_starts' => 'foo',
78 'item_ends' => 'foo',
79 'item_definition' => 'foo',
80 'item_preserve' => 'foo',
81 'item_comment' => 'foo',
82 'item_definer' => 'foo'
84 array(
85 'item_name' => 'foo',
86 'item_type' => 'RECURRING',
87 'item_type_toggle' => 'ONE TIME',
88 'item_original_name' => 'foo',
89 'item_status' => 'foo',
90 'item_execute_at' => 'foo',
91 'item_interval_value' => 'foo',
92 'item_interval_field' => 'foo',
93 'item_starts' => 'foo',
94 'item_ends' => 'foo',
95 'item_definition' => 'foo',
96 'item_preserve' => 'foo',
97 'item_comment' => 'foo',
98 'item_definer' => 'foo'