Translation update done using Pootle.
[phpmyadmin/ammaryasirr.git] / test / libraries / rte / PMA_TRI_getDataFromRequest_test.php
blobaf10eaa4b4a16d934b4d099099403189401a9ccf
1 <?php
2 /* vim: set expandtab sw=4 ts=4 sts=4: */
3 /**
4 * Test for fetching trigger data from HTTP request
6 * @package phpMyAdmin-test
7 */
9 /*
10 * Include to test.
12 require_once 'libraries/rte/rte_triggers.lib.php';
14 class PMA_TRI_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_TRI_getDataFromRequest());
32 public function provider()
34 return array(
35 array(
36 array(
37 'item_name' => '',
38 'item_table' => '',
39 'item_original_name' => '',
40 'item_action_timing' => '',
41 'item_event_manipulation' => '',
42 'item_definition' => '',
43 'item_definer' => ''
45 array(
46 'item_name' => '',
47 'item_table' => '',
48 'item_original_name' => '',
49 'item_action_timing' => '',
50 'item_event_manipulation' => '',
51 'item_definition' => '',
52 'item_definer' => ''
55 array(
56 array(
57 'item_name' => 'foo',
58 'item_table' => 'foo',
59 'item_original_name' => 'foo',
60 'item_action_timing' => 'foo',
61 'item_event_manipulation' => 'foo',
62 'item_definition' => 'foo',
63 'item_definer' => 'foo'
65 array(
66 'item_name' => 'foo',
67 'item_table' => 'foo',
68 'item_original_name' => 'foo',
69 'item_action_timing' => 'foo',
70 'item_event_manipulation' => 'foo',
71 'item_definition' => 'foo',
72 'item_definer' => 'foo'