Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
b5c7b6445d
@ -414,38 +414,28 @@ class PMA_User_Preferences_Test extends PHPUnit_Framework_TestCase
|
||||
$GLOBALS['PMA_PHP_SELF'] = 'phpunit';
|
||||
$result = PMA_userprefsAutoloadGetHeader();
|
||||
|
||||
$this->assertTag(
|
||||
PMA_getTagArray(
|
||||
'<form action="prefs_manage.php" method="post">'
|
||||
),
|
||||
$this->assertContains(
|
||||
'<form action="prefs_manage.php" method="post">',
|
||||
$result
|
||||
);
|
||||
|
||||
$this->assertTag(
|
||||
PMA_getTagArray(
|
||||
'<input type="hidden" name="token" value="token"'
|
||||
),
|
||||
$this->assertContains(
|
||||
'<input type="hidden" name="token" value="token"',
|
||||
$result
|
||||
);
|
||||
|
||||
$this->assertTag(
|
||||
PMA_getTagArray(
|
||||
'<input type="hidden" name="json" value="" />'
|
||||
),
|
||||
$this->assertContains(
|
||||
'<input type="hidden" name="json" value="" />',
|
||||
$result
|
||||
);
|
||||
|
||||
$this->assertTag(
|
||||
PMA_getTagArray(
|
||||
'<input type="hidden" name="submit_import" value="1" />'
|
||||
),
|
||||
$this->assertContains(
|
||||
'<input type="hidden" name="submit_import" value="1" />',
|
||||
$result
|
||||
);
|
||||
|
||||
$this->assertTag(
|
||||
PMA_getTagArray(
|
||||
'<input type="hidden" name="return_url" value="phpunit?" />'
|
||||
),
|
||||
$this->assertContains(
|
||||
'<input type="hidden" name="return_url" value="phpunit?" />',
|
||||
$result
|
||||
);
|
||||
}
|
||||
|
||||
@ -62,11 +62,9 @@ class PMA_EVN_GetEditorForm_Test extends PHPUnit_Framework_TestCase
|
||||
{
|
||||
$GLOBALS['is_ajax_request'] = false;
|
||||
PMA_EVN_setGlobals();
|
||||
$this->assertTag(
|
||||
$this->assertContains(
|
||||
$matcher,
|
||||
PMA_EVN_getEditorForm('add', 'change', $data),
|
||||
'',
|
||||
false
|
||||
PMA_EVN_getEditorForm('add', 'change', $data)
|
||||
);
|
||||
}
|
||||
|
||||
@ -97,138 +95,43 @@ class PMA_EVN_GetEditorForm_Test extends PHPUnit_Framework_TestCase
|
||||
return array(
|
||||
array(
|
||||
$data,
|
||||
array(
|
||||
'tag' => 'input',
|
||||
'attributes' => array(
|
||||
'name' => 'add_item'
|
||||
)
|
||||
)
|
||||
"<input name='add_item'"
|
||||
),
|
||||
array(
|
||||
$data,
|
||||
array(
|
||||
'tag' => 'input',
|
||||
'attributes' => array(
|
||||
'name' => 'item_name'
|
||||
)
|
||||
)
|
||||
"<input type='text' name='item_name'"
|
||||
),
|
||||
array(
|
||||
$data,
|
||||
array(
|
||||
'tag' => 'select',
|
||||
'attributes' => array(
|
||||
'name' => 'item_status'
|
||||
)
|
||||
)
|
||||
"<select name='item_status'"
|
||||
),
|
||||
array(
|
||||
$data,
|
||||
array(
|
||||
'tag' => 'input',
|
||||
'attributes' => array(
|
||||
'name' => 'item_type'
|
||||
)
|
||||
)
|
||||
"<input name='item_type'"
|
||||
),
|
||||
array(
|
||||
$data,
|
||||
array(
|
||||
'tag' => 'input',
|
||||
'attributes' => array(
|
||||
'name' => 'item_changetype'
|
||||
)
|
||||
)
|
||||
"<input type='text' name='item_execute_at'"
|
||||
),
|
||||
array(
|
||||
$data,
|
||||
array(
|
||||
'tag' => 'input',
|
||||
'attributes' => array(
|
||||
'name' => 'item_execute_at'
|
||||
)
|
||||
)
|
||||
"<input type='text' name='item_ends'"
|
||||
),
|
||||
array(
|
||||
$data,
|
||||
array(
|
||||
'tag' => 'input',
|
||||
'attributes' => array(
|
||||
'name' => 'item_interval_value'
|
||||
)
|
||||
)
|
||||
"<textarea name='item_definition'"
|
||||
),
|
||||
array(
|
||||
$data,
|
||||
array(
|
||||
'tag' => 'select',
|
||||
'attributes' => array(
|
||||
'name' => 'item_interval_field'
|
||||
)
|
||||
)
|
||||
"<input type='text' name='item_definer'"
|
||||
),
|
||||
array(
|
||||
$data,
|
||||
array(
|
||||
'tag' => 'input',
|
||||
'attributes' => array(
|
||||
'name' => 'item_starts'
|
||||
)
|
||||
)
|
||||
"<input type='text' name='item_comment'"
|
||||
),
|
||||
array(
|
||||
$data,
|
||||
array(
|
||||
'tag' => 'input',
|
||||
'attributes' => array(
|
||||
'name' => 'item_ends'
|
||||
)
|
||||
)
|
||||
),
|
||||
array(
|
||||
$data,
|
||||
array(
|
||||
'tag' => 'textarea',
|
||||
'attributes' => array(
|
||||
'name' => 'item_definition'
|
||||
)
|
||||
)
|
||||
),
|
||||
array(
|
||||
$data,
|
||||
array(
|
||||
'tag' => 'input',
|
||||
'attributes' => array(
|
||||
'name' => 'item_preserve'
|
||||
)
|
||||
)
|
||||
),
|
||||
array(
|
||||
$data,
|
||||
array(
|
||||
'tag' => 'input',
|
||||
'attributes' => array(
|
||||
'name' => 'item_definer'
|
||||
)
|
||||
)
|
||||
),
|
||||
array(
|
||||
$data,
|
||||
array(
|
||||
'tag' => 'input',
|
||||
'attributes' => array(
|
||||
'name' => 'item_comment'
|
||||
)
|
||||
)
|
||||
),
|
||||
array(
|
||||
$data,
|
||||
array(
|
||||
'tag' => 'input',
|
||||
'attributes' => array(
|
||||
'name' => 'editor_process_add'
|
||||
)
|
||||
)
|
||||
"<input type='submit' name='editor_process_add'"
|
||||
)
|
||||
);
|
||||
}
|
||||
@ -247,11 +150,9 @@ class PMA_EVN_GetEditorForm_Test extends PHPUnit_Framework_TestCase
|
||||
{
|
||||
$GLOBALS['is_ajax_request'] = false;
|
||||
PMA_EVN_setGlobals();
|
||||
$this->assertTag(
|
||||
$this->assertContains(
|
||||
$matcher,
|
||||
PMA_EVN_getEditorForm('edit', 'change', $data),
|
||||
'',
|
||||
false
|
||||
PMA_EVN_getEditorForm('edit', 'change', $data)
|
||||
);
|
||||
}
|
||||
|
||||
@ -282,138 +183,43 @@ class PMA_EVN_GetEditorForm_Test extends PHPUnit_Framework_TestCase
|
||||
return array(
|
||||
array(
|
||||
$data,
|
||||
array(
|
||||
'tag' => 'input',
|
||||
'attributes' => array(
|
||||
'name' => 'edit_item'
|
||||
)
|
||||
)
|
||||
"<input name='edit_item'"
|
||||
),
|
||||
array(
|
||||
$data,
|
||||
array(
|
||||
'tag' => 'input',
|
||||
'attributes' => array(
|
||||
'name' => 'item_name'
|
||||
)
|
||||
)
|
||||
"<input type='text' name='item_name'"
|
||||
),
|
||||
array(
|
||||
$data,
|
||||
array(
|
||||
'tag' => 'select',
|
||||
'attributes' => array(
|
||||
'name' => 'item_status'
|
||||
)
|
||||
)
|
||||
"<select name='item_status'"
|
||||
),
|
||||
array(
|
||||
$data,
|
||||
array(
|
||||
'tag' => 'input',
|
||||
'attributes' => array(
|
||||
'name' => 'item_type'
|
||||
)
|
||||
)
|
||||
"<input name='item_type'"
|
||||
),
|
||||
array(
|
||||
$data,
|
||||
array(
|
||||
'tag' => 'input',
|
||||
'attributes' => array(
|
||||
'name' => 'item_changetype'
|
||||
)
|
||||
)
|
||||
"<input type='text' name='item_execute_at'"
|
||||
),
|
||||
array(
|
||||
$data,
|
||||
array(
|
||||
'tag' => 'input',
|
||||
'attributes' => array(
|
||||
'name' => 'item_execute_at'
|
||||
)
|
||||
)
|
||||
"<input type='text' name='item_ends'"
|
||||
),
|
||||
array(
|
||||
$data,
|
||||
array(
|
||||
'tag' => 'input',
|
||||
'attributes' => array(
|
||||
'name' => 'item_interval_value'
|
||||
)
|
||||
)
|
||||
"<textarea name='item_definition'"
|
||||
),
|
||||
array(
|
||||
$data,
|
||||
array(
|
||||
'tag' => 'select',
|
||||
'attributes' => array(
|
||||
'name' => 'item_interval_field'
|
||||
)
|
||||
)
|
||||
"<input type='text' name='item_definer'"
|
||||
),
|
||||
array(
|
||||
$data,
|
||||
array(
|
||||
'tag' => 'input',
|
||||
'attributes' => array(
|
||||
'name' => 'item_starts'
|
||||
)
|
||||
)
|
||||
"<input type='text' name='item_comment'"
|
||||
),
|
||||
array(
|
||||
$data,
|
||||
array(
|
||||
'tag' => 'input',
|
||||
'attributes' => array(
|
||||
'name' => 'item_ends'
|
||||
)
|
||||
)
|
||||
),
|
||||
array(
|
||||
$data,
|
||||
array(
|
||||
'tag' => 'textarea',
|
||||
'attributes' => array(
|
||||
'name' => 'item_definition'
|
||||
)
|
||||
)
|
||||
),
|
||||
array(
|
||||
$data,
|
||||
array(
|
||||
'tag' => 'input',
|
||||
'attributes' => array(
|
||||
'name' => 'item_preserve'
|
||||
)
|
||||
)
|
||||
),
|
||||
array(
|
||||
$data,
|
||||
array(
|
||||
'tag' => 'input',
|
||||
'attributes' => array(
|
||||
'name' => 'item_definer'
|
||||
)
|
||||
)
|
||||
),
|
||||
array(
|
||||
$data,
|
||||
array(
|
||||
'tag' => 'input',
|
||||
'attributes' => array(
|
||||
'name' => 'item_comment'
|
||||
)
|
||||
)
|
||||
),
|
||||
array(
|
||||
$data,
|
||||
array(
|
||||
'tag' => 'input',
|
||||
'attributes' => array(
|
||||
'name' => 'editor_process_edit'
|
||||
)
|
||||
)
|
||||
"<input type='submit' name='editor_process_edit'"
|
||||
)
|
||||
);
|
||||
}
|
||||
@ -432,11 +238,9 @@ class PMA_EVN_GetEditorForm_Test extends PHPUnit_Framework_TestCase
|
||||
{
|
||||
$GLOBALS['is_ajax_request'] = true;
|
||||
PMA_EVN_setGlobals();
|
||||
$this->assertTag(
|
||||
$this->assertContains(
|
||||
$matcher,
|
||||
PMA_EVN_getEditorForm('edit', 'change', $data),
|
||||
'',
|
||||
false
|
||||
PMA_EVN_getEditorForm('edit', 'change', $data)
|
||||
);
|
||||
}
|
||||
|
||||
@ -467,30 +271,15 @@ class PMA_EVN_GetEditorForm_Test extends PHPUnit_Framework_TestCase
|
||||
return array(
|
||||
array(
|
||||
$data,
|
||||
array(
|
||||
'tag' => 'select',
|
||||
'attributes' => array(
|
||||
'name' => 'item_type'
|
||||
)
|
||||
)
|
||||
"<select name='item_type'"
|
||||
),
|
||||
array(
|
||||
$data,
|
||||
array(
|
||||
'tag' => 'input',
|
||||
'attributes' => array(
|
||||
'name' => 'editor_process_edit'
|
||||
)
|
||||
)
|
||||
"<input type='hidden' name='editor_process_edit'"
|
||||
),
|
||||
array(
|
||||
$data,
|
||||
array(
|
||||
'tag' => 'input',
|
||||
'attributes' => array(
|
||||
'name' => 'ajax_request'
|
||||
)
|
||||
)
|
||||
"<input type='hidden' name='ajax_request'"
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
@ -75,7 +75,10 @@ class PMA_RTN_GetEditorForm_Test extends PHPUnit_Framework_TestCase
|
||||
{
|
||||
$GLOBALS['is_ajax_request'] = false;
|
||||
PMA_RTN_setGlobals();
|
||||
$this->assertTag($matcher, PMA_RTN_getParameterRow($data, $index), false);
|
||||
$this->assertContains(
|
||||
$matcher,
|
||||
PMA_RTN_getParameterRow($data, $index)
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -115,62 +118,27 @@ class PMA_RTN_GetEditorForm_Test extends PHPUnit_Framework_TestCase
|
||||
array(
|
||||
$data,
|
||||
0,
|
||||
array(
|
||||
'tag' => 'select',
|
||||
'attributes' => array(
|
||||
'name' => 'item_param_dir[0]'
|
||||
)
|
||||
)
|
||||
"<select name='item_param_dir[0]'"
|
||||
),
|
||||
array(
|
||||
$data,
|
||||
0,
|
||||
array(
|
||||
'tag' => 'input',
|
||||
'attributes' => array(
|
||||
'name' => 'item_param_name[0]'
|
||||
)
|
||||
)
|
||||
"<input name='item_param_name[0]'"
|
||||
),
|
||||
array(
|
||||
$data,
|
||||
0,
|
||||
array(
|
||||
'tag' => 'select',
|
||||
'attributes' => array(
|
||||
'name' => 'item_param_type[0]'
|
||||
)
|
||||
)
|
||||
"<select name='item_param_type[0]'"
|
||||
),
|
||||
array(
|
||||
$data,
|
||||
0,
|
||||
array(
|
||||
'tag' => 'input',
|
||||
'attributes' => array(
|
||||
'name' => 'item_param_length[0]'
|
||||
)
|
||||
)
|
||||
"<select name='item_param_opts_num[0]'"
|
||||
),
|
||||
array(
|
||||
$data,
|
||||
0,
|
||||
array(
|
||||
'tag' => 'select',
|
||||
'attributes' => array(
|
||||
'name' => 'item_param_opts_num[0]'
|
||||
)
|
||||
)
|
||||
),
|
||||
array(
|
||||
$data,
|
||||
0,
|
||||
array(
|
||||
'tag' => 'a',
|
||||
'attributes' => array(
|
||||
'class' => 'routine_param_remove_anchor'
|
||||
)
|
||||
)
|
||||
"<a href='#' class='routine_param_remove_anchor'"
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user